V1.225 Upgrade to this ASAP, removed some Tier 14 units. V1.224 Fixed another entry possibly causing Divide by Zero error Welcome To Boogies Upgrade mod, my mob where I attempt to make upgrades of every troops that can't be upgraded have an actual upgrade. These upgrades will take the troop to T7-13. Sorry for the problems with the mod since the re-release, I'm really trying to nail down things causing the problems and again released another patch 1.224 that I'm hoping will stop it for good this time.
Yeah I dont get it when I first released the mod I let myself afk and run around a load and nothing happened; and did this a few games no crashes. Now I released it all these divide by error things are popping up. I'm desperately cycling through every troop for some weird levelling into the same tier or lower tier upgrade path.
Basically when the game upgrades a troop from level 1 to 1 or level 6 to 6 the game gives me a divide by zero error (this is reproducible and tested). However now that I have been through everything really carefully again I can't see to nail down where I'm upgrading any level into another level. Maybe its broken my campaign now and I have to restart, even though I correct some things causing the divide by zero.
I removed this mod and started a new campaign. I was surprised when, after a long while, I got a divide by zero crash. Then I remembered that I had altered the "Crazed Men" troop tree from Calradia at War to match the new level formatting.
The 'Crazed Men' initially had levels 1, 4, 7, 10, 13, 17, 20, 23, 26, 29, and 32. I had changed those to 6, 11, 16, 21, 26, 31, 36, 41, 46, 51 and 56 so that it would work with the Unlock troops T7-T13 mod.
I've reverted those back to their original values and have been playing for hours with no problem. So, I believe there is an issue with the T7-T13 Mod and not this one.
Dude I really appreciate you helping to fix my mod I really do, l'm only a xml level modder and I'm lost when it comes to coding and stuff. You know what I really do think you might be right because I have 100% thorough checked at this point and everything looks good. My mod will still function without it.
Awesome mod, but sadly, unplayable for now. Divide by zero error when you are trying to upgrade troops. Vosskerian's way to fix kinda works - you can upgrade troops,but it will be for free (no xp cost, and 0 money cost) for all tiers up to maximum in the tree and will still crash if you hover mouse over xp progress bar. If this mod is used together with "Unlock troops T7-T13" , game will throw another gamebreaking error making save file unplayable and Vosskerian's fix unfortunately not helping. Making new campaign with fix still will give same error.
Hey, i was looking mostly for some mod that will make bandits a viable option. I'm using fouberie mod (sorry if I spelled that incorrectly) and wanted to make a campaign with full focus on bandits only. Does this mod makes it possible? Also it would be great if you could include images of all troop trees!
I recently encountered a "Divided by Zero" error while engaging with version 1.2.8 of the MOD for Bannerlord. This technical hiccup seems to interrupt the gameplay experience, and I wanted to bring it to the attention of the community and developer for potential resolution. Aside from this issue, I must commend this mod's incredible impact on the game's replayability. It transforms Bannerlord into a vastly richer and more fun experience. It's an exemplary mod that significantly makes the game great again.
And this is the GetCharacterWage method in TaleWorlds.CampaignSystem.dll: public override int GetCharacterWage(CharacterObject character) { int num; switch (character.Tier) { case 0: num = 1; break; case 1: num = 2; break; case 2: num = 3; break; case 3: num = 5; break; case 4: num = 8; break; case 5: num = 12; break; case 6: num = 17; break; default: num = 23; break; } if (character.Occupation == Occupation.Mercenary) { num = (int)((float)num * 1.5f); } return num; }
In this case, when character.Tier is greater than 7, it causes (partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier + 1) - partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier)) to equal 0, which results in a division by 0 error.
I don't know how to write mods, but I personally used dnSpy to change num=23; to num = character.Tier * 3; as default: num = character.Tier * 3; break; and the game ran well. It hasn't crashed since then.
My English is not very good, and I used a translator to write this. I hope I can provide a solution or a fix idea for this issue.
468 comments
V1.225 Upgrade to this ASAP, removed some Tier 14 units.
V1.224 Fixed another entry possibly causing Divide by Zero error
Welcome To Boogies Upgrade mod, my mob where I attempt to make upgrades of every troops that can't be upgraded have an actual upgrade. These upgrades will take the troop to T7-13. Sorry for the problems with the mod since the re-release, I'm really trying to nail down things causing the problems and again released another patch 1.224 that I'm hoping will stop it for good this time.
Looking at the Imperial Noble Corps,crash
Thank you for the effort you're putting into this. Appreciate it!
Basically when the game upgrades a troop from level 1 to 1 or level 6 to 6 the game gives me a divide by zero error (this is reproducible and tested). However now that I have been through everything really carefully again I can't see to nail down where I'm upgrading any level into another level. Maybe its broken my campaign now and I have to restart, even though I correct some things causing the divide by zero.
The 'Crazed Men' initially had levels 1, 4, 7, 10, 13, 17, 20, 23, 26, 29, and 32. I had changed those to 6, 11, 16, 21, 26, 31, 36, 41, 46, 51 and 56 so that it would work with the Unlock troops T7-T13 mod.
I've reverted those back to their original values and have been playing for hours with no problem. So, I believe there is an issue with the T7-T13 Mod and not this one.
Đ¢his mod rapair boogie troop update
This mod repair bug your mods?
Aside from this issue, I must commend this mod's incredible impact on the game's replayability. It transforms Bannerlord into a vastly richer and more fun experience. It's an exemplary mod that significantly makes the game great again.
1.5.9 ( num2 = elementCopyAtIndex.Number - elementCopyAtIndex.WoundedNumber; )
1.5.10 (
num2 = Math.Max(0, Math.Min(num2, (party.MobileParty.PaymentLimit - party.MobileParty.TotalWage) / (partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier + 1) - partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier))));
)
And this is the GetCharacterWage method in TaleWorlds.CampaignSystem.dll:
public override int GetCharacterWage(CharacterObject character)
{
int num;
switch (character.Tier)
{
case 0:
num = 1;
break;
case 1:
num = 2;
break;
case 2:
num = 3;
break;
case 3:
num = 5;
break;
case 4:
num = 8;
break;
case 5:
num = 12;
break;
case 6:
num = 17;
break;
default:
num = 23;
break;
}
if (character.Occupation == Occupation.Mercenary)
{
num = (int)((float)num * 1.5f);
}
return num;
}
In this case, when character.Tier is greater than 7, it causes (partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier + 1) - partyWageModel.GetCharacterWage(elementCopyAtIndex.Character.Tier)) to equal 0, which results in a division by 0 error.
I don't know how to write mods, but I personally used dnSpy to change num=23; to num = character.Tier * 3; as
default:
num = character.Tier * 3;
break;
and the game ran well. It hasn't crashed since then.
My English is not very good, and I used a translator to write this. I hope I can provide a solution or a fix idea for this issue.
edit: i use my littile warband
edit: Your mod not work on 1.2.7