Please allow tier 7+ troops in the game again.

Users who are viewing this thread

Ever since update 1.6 you broke the ability to add new troops above tier 6 into the game. My favourite thing in this game and in warband was when reaching a maximum upgrade of troop I could just mod in a new higher tier troop mid game even and the game was perfectly fine with it.

Now if you or the ai attempt to upgrade to any troop I create above tier 6 the game instantly crashes. So now Im forced to play on 1.59 and not get any of the better optimization and cool features. Many other troop mods have been forced to re-design their mods because you have placed this sudden limitation factor for no reason. Please please I hope you can re-allow this.
 
after doing some research from threads a ex-dev guy discovered this change is responsible:

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))));

)

'In a nutshell, the TroopTree has been (?inadvertently?) capped at Tier 7. Exceeding that will trigger the error. Again, not sure it was on purpose, because without this code bug, exceeding Tier 7 would not crash this function.'

Anyway I just wanted to bring this to attention and keep up the great work on the game; hopefully in a future patch this can be looked at as its a limitation to a thing that made so much more possible before.
 
Hey, try this Harmony patch. You can change 10 to the number of tiers you want.

C#:
[HarmonyPatch(typeof(CharacterHelper), "GetCharacterTier")]
public static bool Prefix(CharacterObject character, ref int __result)
{
    if (character.IsHero)
    {
        __result = 0;
    }
    __result = Math.Min(Math.Max(MathF.Ceiling(((float)character.Level - 5f) / 5f), 0), 10);
    return false;
}
 
Top Bottom