Nemeo
Sergeant at Arms

Hello,
According to what I understand in this piece of script, when the player picks a banner, the game gives the AI the last banner of the list:
#Correcting banners according to the player banner
(troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
(assign, ":end_cond", kingdom_heroes_end),
(try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
(troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
(assign, ":end_cond", 0),
(try_end),
What I'd like to do is to force the AI to take a specific banner. Something like:
#Correcting banners according to the player banner
(troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
(assign, ":end_cond", kingdom_heroes_end),
(try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
(troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
(store_troop_faction, ":kingdom_hero_faction", ":cur_troop"),
(try_begin),
(eq, ":kingdom_hero_faction", "fac_kingdom_1"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_2"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_two),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_3"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_three),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_4"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_four),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_5"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_five),
(try_end),
(assign, ":end_cond", 0),
(try_end),
But I don't know if the "banner_scene_props_end_minus_x" exists. Could you tell me if it does? Or another way to do it ?
According to what I understand in this piece of script, when the player picks a banner, the game gives the AI the last banner of the list:
#Correcting banners according to the player banner
(troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
(assign, ":end_cond", kingdom_heroes_end),
(try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
(troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
(assign, ":end_cond", 0),
(try_end),
What I'd like to do is to force the AI to take a specific banner. Something like:
#Correcting banners according to the player banner
(troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
(assign, ":end_cond", kingdom_heroes_end),
(try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
(troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
(store_troop_faction, ":kingdom_hero_faction", ":cur_troop"),
(try_begin),
(eq, ":kingdom_hero_faction", "fac_kingdom_1"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_2"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_two),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_3"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_three),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_4"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_four),
(else_try),
(eq, ":kingdom_hero_faction", "fac_kingdom_5"),
(troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_five),
(try_end),
(assign, ":end_cond", 0),
(try_end),
But I don't know if the "banner_scene_props_end_minus_x" exists. Could you tell me if it does? Or another way to do it ?
