Suggestion General Could you remove the hard limitation for bandit types in a single bandit party?

Users who are viewing this thread

bfmsc

Recruit
Dear Devs, I am a modder making a troop tree expand mod, And I made several new bandits for each bandit factions (such as sea raiders and forest bandits), but after I fill those new bandits into my partytemplate.xml I found it's not function like what it should be: my new bandits seems never appear in bandit parties. And after I asked some one familiar with the game code we found there's actually a hard limit for bandit parties: the game will only generate bandits with up to 3 types of bandits, because there is a hard limitation:

private void FillPartyStacks(PartyTemplateObject pt, int troopNumberLimit = -1)
{
if (this.IsBandit)
{
float playerProgress = Campaign.Current.PlayerProgress;
float num = 0.4f + 0.8f * playerProgress;
int num2 = MBRandom.RandomInt(2);
float num3 = (num2 == 0) ? MBRandom.RandomFloat : (MBRandom.RandomFloat * MBRandom.RandomFloat * MBRandom.RandomFloat * 4f);
float num4 = (num2 == 0) ? (num3 * 0.8f + 0.2f) : (1f + num3);
float randomFloat = MBRandom.RandomFloat;
float randomFloat2 = MBRandom.RandomFloat;
float randomFloat3 = MBRandom.RandomFloat;
```````


use one of my bandit partytemplate as an example:
<MBPartyTemplate id="desert_bandits_template" >
<stacks>
<PartyTemplateStack min_value="2" max_value="10" troop="NPCCharacter.desert_bandits_bandit" />
<PartyTemplateStack min_value="0" max_value="4" troop="NPCCharacter.desert_bandits_raider" />
<PartyTemplateStack min_value="0" max_value="2" troop="NPCCharacter.desert_bandits_chief" />
<PartyTemplateStack min_value="0" max_value="2" troop="NPCCharacter.desert_bandits_champion" />
<PartyTemplateStack min_value="2" max_value="4" troop="NPCCharacter.desert_bandits_alt3" />
<PartyTemplateStack min_value="0" max_value="2" troop="NPCCharacter.desert_bandits_alt4" />
<PartyTemplateStack min_value="0" max_value="1" troop="NPCCharacter.desert_bandits_alt5" />
</stacks>
</MBPartyTemplate>


If the first 3 type of bandits all appeared in a bandit group, then the game won't generate following bandits at all because there were already 3 types of bandits in the party.

that makes my bandit overhaul and maybe many bandit expand mods become useless, could you consider remove that limitation?

@Dejan
 
Back
Top Bottom