Hi there, I know how to make lords use their faction's banner - but I am looking for a way to make them update their banner if they join another faction. Is that possible?
#Change banner
(try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
(faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
(val_sub, ":cur_faction_banner", banner_meshes_begin),
(val_add, ":cur_faction_banner", banner_scene_props_begin),
(troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":cur_faction_banner"),
(try_end),
# Troops:
# Assign banners and renown.
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
#Change banner
(try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
(faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
(val_sub, ":cur_faction_banner", banner_meshes_begin),
(val_add, ":cur_faction_banner", banner_scene_props_begin),
(troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":cur_faction_banner"),
(try_end),
maybe banner icon and party_templateThere must be some other script then which handles the banners on the world map. Maybe check for a keyword "banner" and look for scripts that govern the initialization/ assignment/ application of banners to lords.
I tried your code and it didn't work for me. Trying to do the same thing as you, no matter what I do the lords won't update their banner for both castles/towns inside banners and outside flags and parties banner as wellOk so I have added these few lines to "change_troop_faction" (module_scripts.py):
After a few moments in-game the lord's banner is updated in the presentation notes, the banner of the settlements he owns are changed as well, but his own party flag remains the same on the map..Code:#Change banner (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end), (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner), (val_sub, ":cur_faction_banner", banner_meshes_begin), (val_add, ":cur_faction_banner", banner_scene_props_begin), (troop_set_slot, ":troop_no", slot_troop_banner_scene_prop, ":cur_faction_banner"), (try_end),
E.g.:
Any ideas on what could be missing in order to update the party's flag as well?
Edit 1- The flag actually does get updated - after the lord has been defeated in battle. The 'new' party spawns with the right banner. Problem solved
Edit 2- And it happens only once, so if the player has convinced a lord of joining their faction, and then changes their banner, the lord's banner will remain the one of when he joined the faction