Author Topic: NPC Army Composition  (Read 1795 times)

0 Members and 1 Guest are viewing this topic.

Lancer

  • Sergeant
  • *
  • too cool for artistic expression
    • View Profile
  • Faction: Neutral
  • MP nick: GANZO
NPC Army Composition
« on: November 24, 2008, 01:35:01 AM »
I've tried searching for this and haven't found a precise answer, so I'll throw it out:

I've been trying to understand what determines the composition (ie. number of each troop types) of NPC lord armies. I know it has something to do with both the reinforcements section of mod_party_templates and the several areas of mod_scripts, but I'm not sure where they are.

My issue is that while the received wisdom seems to be that these things are random, as far as I can see they're not, or at least not fully. The numbers associated with each reinforcement type in mod_party_templates are supposedly minima and maxima of each troop for each reinforcement cycle (or something) but they're really not working like that for me in practice.

My problem boils down to this: I have a mod based on a pared-down vanilla, with only 5 troop types to each faction, which are correspondingly set up as the 5 tiers. I set the min and max values (or whatever they are) in mod_party_templates in order to reflect the ratio I desired (eg. cheaper troops should be more plentiful, elite troops rarer) but this just isn't reflected in the game. NPC armies are consistently "top-heavy" with the tier 4 and 5 troops making up ~60% of the parties, and only a handful of each lower-tier troop.

Has anyone else experienced issues like this? Am I just using the reinforcement numbers wrongly, or is there some scripting element that I've missed which influences this?

Thanks in advance,

Lancer
Age of Fire and Thunder:
http://forums.taleworlds.net/index.php/topic,13703.0.html

Our research indicates that mass impalement has proven a consistently effective method of conflict resolution.

The Mercenary

  • Grandmaster Knight
  • *
  • Rest in peace, Cymro. We'll all miss you.
    • View Profile
  • Faction: Neutral
Re: NPC Army Composition
« Reply #1 on: November 24, 2008, 03:46:28 AM »
I've tried searching for this and haven't found a precise answer, so I'll throw it out:

I've been trying to understand what determines the composition (ie. number of each troop types) of NPC lord armies. I know it has something to do with both the reinforcements section of mod_party_templates and the several areas of mod_scripts, but I'm not sure where they are.

My issue is that while the received wisdom seems to be that these things are random, as far as I can see they're not, or at least not fully. The numbers associated with each reinforcement type in mod_party_templates are supposedly minima and maxima of each troop for each reinforcement cycle (or something) but they're really not working like that for me in practice.

My problem boils down to this: I have a mod based on a pared-down vanilla, with only 5 troop types to each faction, which are correspondingly set up as the 5 tiers. I set the min and max values (or whatever they are) in mod_party_templates in order to reflect the ratio I desired (eg. cheaper troops should be more plentiful, elite troops rarer) but this just isn't reflected in the game. NPC armies are consistently "top-heavy" with the tier 4 and 5 troops making up ~60% of the parties, and only a handful of each lower-tier troop.

Has anyone else experienced issues like this? Am I just using the reinforcement numbers wrongly, or is there some scripting element that I've missed which influences this?

Thanks in advance,

Lancer

That's because the AI gets an experience boost when it gets new troops. You have to set the XP boost to 0.

Lancer

  • Sergeant
  • *
  • too cool for artistic expression
    • View Profile
  • Faction: Neutral
  • MP nick: GANZO
Re: NPC Army Composition
« Reply #2 on: November 24, 2008, 11:17:22 PM »
Okay, makes sense... Where is that set? Scripts, or with the troops themselves?

Lancer
Age of Fire and Thunder:
http://forums.taleworlds.net/index.php/topic,13703.0.html

Our research indicates that mass impalement has proven a consistently effective method of conflict resolution.

Lancer

  • Sergeant
  • *
  • too cool for artistic expression
    • View Profile
  • Faction: Neutral
  • MP nick: GANZO
Re: NPC Army Composition
« Reply #3 on: November 26, 2008, 12:48:53 AM »
Hmm, okay... thanks for the in-depth explanation. It's possible that my observations are just coincidence at it evens out after a while, but FWIW I'll post the way I have it set up, to explain what I mean:

Taking the Nords as an example, I have 5 units:
nord_recruit (level 12)
nord_footman (level 14)
nord_trained_footman (level 16)
nord_warrior (level 15)
nord_veteran (level 20)

and the table set up this way:

Code: [Select]
  ("kingdom_4_reinforcements_a", "kingdom_4_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_nord_footman,4,8),(trp_nord_recruit,2,4)]),
  ("kingdom_4_reinforcements_b", "kingdom_4_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_nord_trained_footman,1,4),(trp_nord_warrior,3,7)]),
  ("kingdom_4_reinforcements_c", "kingdom_4_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_nord_veteran,3,6)]),

Time after time, this arrangement yields Nord parties where (out of say 80 men as an approximate average) 25-30 are nord_trained_footmen, 25-30 are nord_veteran and the remaining 20 or so are split between the other three troop types. This is definitely not the distribution I was going for. Have I just set up the numbers wrong in that case (ie. does the code above produce that result) or is there something else going on?

Thanks for the patience, just trying to sort this out as it has been really bothering me.

Lancer
Age of Fire and Thunder:
http://forums.taleworlds.net/index.php/topic,13703.0.html

Our research indicates that mass impalement has proven a consistently effective method of conflict resolution.