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;
}
 
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;
}
Hello, I've run into issues with my own custom troop trees due to the 7 tier limitation. How do you implement this harmony patch? Afraid my modding expertise never went much beyond editing xml's in notepad :razz:
 
Yeah its still a issue, I'm going to have to go learn harmony I guess.

It also breaks if you make any unit upgrade to anything other than 1,6,11,16,21,26 and 31. Every unit now has to upgrade in that specific pattern. My modding joy has been sucked right out under me.
 
Yeah I tried making some headway but I just don't have enough programming knowledge to make sense of what I'm doing wrong with setting up the harmony patching stuff.
 
Please I'm begging there was a guy who made a t7 unlock but he doesn't think it would work well to make units anything over t7 or in between even. I have wanted so many many times to restart work on my mod over the years and it was PERFECTLY possible to use any tier of units before patch 1.510. Please can you check the code for the unit tiering system :sad:
 
Back
Top Bottom