EvilSquid
Recruit

Currently, Lords are assigned a title/rank at game start, and whenever they change faction.
There are three ranks for each faction: one for Kings, one for Lords who only own a village, and one for Lords who own at least one fort or town.
The only thing currently missing is that Lords don't actually get "promoted" - i.e. if a Lord with only villages (or no fiefs at all) gets given a fort or town, their rank/title doesn't change.
To fix this simply requires adding the following snippet:
to the script give_center_to_lord in the town/fort section, e.g. after these lines works well:
If you're wondering why I explicitly don't do this for the player, it's because the troop_set_title_according_to_faction script, when called with the player's troop, replaces the player's name with "Player" and just adds the faction-specific title to the front of it (so I became "Konungr Player" whenever assigning a fief to myself as King - I suspect it'd do something similar with the other titles).
I'm guessing it was never intended for the player to receive a title - possibly due to potentially running out of characters for the player's name if the player chose a long one?
There are three ranks for each faction: one for Kings, one for Lords who only own a village, and one for Lords who own at least one fort or town.
The only thing currently missing is that Lords don't actually get "promoted" - i.e. if a Lord with only villages (or no fiefs at all) gets given a fort or town, their rank/title doesn't change.
To fix this simply requires adding the following snippet:
插入代码块:
(try_begin),
(neq, ":lord_troop_id", "trp_player"),
(call_script, "script_troop_set_title_according_to_faction", ":lord_troop_id", ":lord_troop_faction"),
(end_try),
to the script give_center_to_lord in the town/fort section, e.g. after these lines works well:
插入代码块:
(try_begin),
(this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town),
(party_slot_eq, ":center_no", slot_party_type, spt_castle),
(gt, ":lord_troop_id", -1),
If you're wondering why I explicitly don't do this for the player, it's because the troop_set_title_according_to_faction script, when called with the player's troop, replaces the player's name with "Player" and just adds the faction-specific title to the front of it (so I became "Konungr Player" whenever assigning a fief to myself as King - I suspect it'd do something similar with the other titles).
I'm guessing it was never intended for the player to receive a title - possibly due to potentially running out of characters for the player's name if the player chose a long one?
