Lord's Parties, and Town Garrisons? (Specifying number, and types of troops)

Users who are viewing this thread

Hibiki

Sergeant Knight at Arms
Alright, so... How does the game handle recruitment of troops in Towns and Lord's parties?  I cannot seem to find anything that specifies what troops are recruited in module_party_templates.py, like all other parties are handled.  The only somewhat related thing I see is "Kingdom Reinforcement" party templates, but editing these does not seem to do anything.  Where can I specify what kind of troops, and how many are recruited by Lords and Towns?  I apologize for asking such a basic question, but I'm yet to find any information on this.

Thanks!

 
Do you mean this bit, in module_scripts.py?

Code:
     (try_begin),
        (eq, ":party_faction", "fac_player_supporters_faction"),
        (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
        (try_begin),
          (gt, ":town_lord", 0),
          (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
        (else_try),
          (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),
        (try_end),
      (try_end),

I suppose that is supposed to have lords recruit any troops that are assigned to their faction, right?
So, all I would have to do is change the faction flag associated with each troop in module_troops.py, right?

The problem is, I've done that, and nothing happens... The same old troops are still recruited.
 
I believe that's what determines what kinda troops lords get.

Code:
("kingdom_1_reinforcements_a", "{!}kingdom_1_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_swadian_recruit,7,9),(trp_swadian_militia,4,9)]),
  ("kingdom_1_reinforcements_b", "{!}kingdom_1_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_swadian_footman,5,8),(trp_swadian_skirmisher,4,6)]),
  ("kingdom_1_reinforcements_c", "{!}kingdom_1_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_swadian_man_at_arms,4,6),(trp_swadian_crossbowman,3,5)]), #Swadians are a bit less-powered thats why they have a bit more troops in their modernised party template (3-6, others 3-5)

  ("kingdom_2_reinforcements_a", "{!}kingdom_2_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_vaegir_recruit,7,9),(trp_vaegir_footman,4,9)]),
  ("kingdom_2_reinforcements_b", "{!}kingdom_2_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_vaegir_veteran,4,6),(trp_vaegir_skirmisher,4,6),(trp_vaegir_footman,1,2)]),
  ("kingdom_2_reinforcements_c", "{!}kingdom_2_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_vaegir_horseman,4,5),(trp_vaegir_infantry,3,5)]),

  ("kingdom_3_reinforcements_a", "{!}kingdom_3_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_khergit_tribesman,6,7),(trp_khergit_skirmisher,7,15)]), #Khergits are a bit less-powered thats why they have a bit more 2nd upgraded(trp_khergit_skirmisher) than non-upgraded one(trp_khergit_tribesman).
  ("kingdom_3_reinforcements_b", "{!}kingdom_3_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_khergit_horseman,5,7),(trp_khergit_horse_archer,4,6),(trp_khergit_skirmisher,3,5)]),
  ("kingdom_3_reinforcements_c", "{!}kingdom_3_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_khergit_horseman,4,6),(trp_khergit_veteran_horse_archer,4,5)]), #Khergits are a bit less-powered thats why they have a bit more troops in their modernised party template (4-7, others 3-5)

  ("kingdom_4_reinforcements_a", "{!}kingdom_4_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_nord_footman,7,12),(trp_nord_recruit,4,6)]),
  ("kingdom_4_reinforcements_b", "{!}kingdom_4_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_nord_huntsman,4,7),(trp_nord_archer,4,5),(trp_nord_footman,3,5)]),
  ("kingdom_4_reinforcements_c", "{!}kingdom_4_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_nord_warrior,5,7)]),

  ("kingdom_5_reinforcements_a", "{!}kingdom_5_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_rhodok_tribesman,7,10),(trp_rhodok_spearman,4,9)]),
  ("kingdom_5_reinforcements_b", "{!}kingdom_5_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_rhodok_crossbowman,5,8),(trp_rhodok_trained_crossbowman,6,9)]),
  ("kingdom_5_reinforcements_c", "{!}kingdom_5_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_rhodok_veteran_spearman,7,10),(trp_rhodok_veteran_crossbowman,7,9)]), 

  ("kingdom_6_reinforcements_a", "{!}kingdom_6_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_sarranid_recruit,5,10),(trp_sarranid_footman,5,8)]),
  ("kingdom_6_reinforcements_b", "{!}kingdom_6_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_sarranid_skirmisher,4,6),(trp_sarranid_veteran_footman,4,7),(trp_sarranid_footman,3,5)]),
  ("kingdom_6_reinforcements_c", "{!}kingdom_6_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_sarranid_horseman,5,8)]),
 
I believe that's what determines what kinda troops lords get.
More or less, but it's the module_scripts sections that determine which choices are made.  You can add more categories there, etc. and just change the script logic, if you want the Lords to randomly get small numbers of special troops or something.
 
Sorry to dig this thread up from the grave, but I became quite busy with school and unable to mod for a little while, and forgot about this thread.  I have more time to mod now, but I haven't had the chance to figure this issue out.

I have looked at everything you guys have suggested. As far as the "logic bit" deciding what gets recruited, that is a bit over my head.  I merely want simple variables that I can change.  As I said before, I tried editing the variables that SoTAL posted, and noticed no change in the kinds of troops that lords, nor towns recruited.

It can't be that complicated. What am I missing?
 
It can't be that complicated.
Actually, yes, it can.

Basically, the script cf_reinforce_party gets called via a simple_trigger.  This then evaluates whether the Party named is a town / castle, gets the Faction, gets the Faction's slot values for reinforcement types A, B, and C, and then goes on to add reinforcements from a party_templates template.  If castle / town, it uses A and B, if lord, it can use all three.  It's totally arbitrary, of course- you can add a D option or whatever easily enough, if you want castles to get troops that nobody else gets or whatever.

In short... if you want to change this, you need to hack cf_reinforce_party.

It refers to the special case differences between hiring for Lords and castles / towns, and picks from the templates accordingly.
 
But, theoretically, if I edit the reinforcement templates, then it should not be able to recruit troops outside of those templates, correct?  Yet it still does.

I would just use the current troop-tree and modify the troops to my liking, but Native simply has too large of a troop tree for what I am planning.  I am going for less diverse, more orderly Kingdom armies.
 
But, theoretically, if I edit the reinforcement templates, then it should not be able to recruit troops outside of those templates, correct?  Yet it still does.
No it doesn't.

It uses the Faction reinforcements_a, b and c templates.  You're looking at the wrong templates :wink:

As for Lords, they get to promote troops, just like you do.  So the only way you can limit them is by removing that code first.  Castles / Towns don't promote troops though.
 
Lords and towns/castles get troops from the templates assign to them in the script. As said, chance of getting template a, b or c for lords and towns/castles only get either a or b. They do not get troops outside of the templates much. However, they can recruit from villages and they can upgrade their troops.

Every two days, Lords have 35/30/25% chance of getting (their training skill + 5)*1000 xp points to upgrade their party (1.5x/1x/0.5x modifier based on difficulty hard/normal/easy). Towns/castle get 35/30/25% chance of upgrading with 4500/3000/1500 xp points (campaign difficulty hard/normal/easy).

What exactly you want to achieve?
 
obelix423 said:
hy  i would like to ask how do you edit players party and how hy is the limit???

:???:

Sir!  How dare you attempt to hijack my thread, and have not even the decency to type properly!  I am compelled to inform you that I take great offense! 

(Actually, I am just joking.  But you would be more likely to get good, helpful responses if you take the time to make your own thread, and write a clear, concise, easy to read and understand post conveying your question.)



Back on topic: I finally got it to work!  It appears that I was editing the wrong reinforcement templates, or something.

Now I just need to find where to specify what troops are hired at towns...
 
Ah! In module_game_menus.py? Where I think to look, and where I should look are never the same.

I assume that also defines what troops lords recruit from towns? Or is that separate from what players recruit?
 
Back
Top Bottom