Problem with starting garrisons

正在查看此主题的用户

状态
不接受进一步回复。

Nameless One

Veteran
I want to have regional troops in my mod. I made a script to replace regular troops with regional where I need it. I placed the call of this script at the end of the game_start script in order to replace 10 knights in the starting garrison, like this:

插入代码块:
(call_script, "script_replace_regular_troops_with_regional", "trp_regular_knight", "trp_special_knight", "p_town_6", 10),

The script works correctly. It reports the number of knights it found for replacement, and it reports different numbers on different tests, as expected. However, when I start the game and check the target town, the number of knights in it is much higher than reported by the script. For example, in my first test, the script found 7 knights and replaced them all, but when I checked there were 7 special knights and 22 regular knights. The number of knights the script reports is between 5 and 15, but when I check the city in the game, it contains more than 20 knights.

Is there some other way the game adds troops to the garrisons outside the game_start script? Is it modable? I don't mind having more than 20 regular knights in the city, but I'd like to guarantee 10 of special ones even when the game_start script ends with less than 10 in the city in question.
 
Search for: "script_cf_reinforce_party"

It is called from several places, namely:
script_give_center_to_lord
script_game_start
simple trigger:  #Hiring men with center wealths
and after sieges
 
I think I figured it out. The game also generates the parties for lords at the beginning. I went on to insert a call of my script after ever upgrade_with_xp operation and it resulted in having 20 of my special knights.

Thanks for responding. Case closed.
 
状态
不接受进一步回复。
后退
顶部 底部