господа с оффорума сделали скрипт - при котором ГГ должен набирать из деревень сначала нейтралов-наёмников,потом(при определённых условиях)солдат своей фракции:
#script_update_volunteer_troops_in_village
# INPUT: arg1 = center_no
# OUTPUT: none
("update_volunteer_troops_in_village",
[
(store_script_param, ":center_no", 1),
(party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
#(party_get_slot, ":center_culture", ":center_no", slot_center_culture), #Spd - Native Original code
# Spd - Script change volunteer troop to player faction
(try_begin),
(party_slot_eq, ":center_no", slot_town_lord, "trp_player"),
(eq, "$player_has_homage", 1), # Spd - Check if player belongs to a faction
(assign, ":center_faction", "$players_kingdom"),
(faction_get_slot, ":center_culture", ":center_faction", slot_faction_culture),
(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
#(else_try), # Spd - Restore these two lines if want troop of village's original faction
#(party_get_slot, ":center_culture", ":center_no", slot_center_culture), #Spd - Native Original code
(else_try),
# Spd - Not tested
(assign, ":center_culture", -1), # Make sure this doesn't exsist You can define new independent culture for this
(try_end),
(try_begin),
(gt, ":center_culture", 0), # Spd - if player belongs to a faction
(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
(assign, ":volunteer_troop_tier", 1),
(store_div, ":tier_upgrades", ":player_relation", 10),
(try_for_range, ":unused", 0, ":tier_upgrades"),
(store_random_in_range, ":random_no", 0, 100),
(lt, ":random_no", "10"),
(store_random_in_range, ":random_no", 0, 2), # 0 for random upgrade, 1 = first node, 2 = second node but return -1 of not available.
(troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
(try_begin),
(le, ":upgrade_troop_no", 0),
(troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
(try_end),
(gt, ":upgrade_troop_no", 0),
(val_add, ":volunteer_troop_tier", 1),
(assign, ":volunteer_troop", ":upgrade_troop_no"),
(try_end),
(else_try), # Spd - (else) if player doesnot belong to a faction, assign farmers
(assign, ":volunteer_troop", "trp_farmer"),
(val_add, ":volunteer_troop_tier", 1),
(try_end),
# Spd - End assigning volunteer troop
(assign, ":upper_limit", 7),
(try_begin),
(ge, ":player_relation", 5),
(assign, ":upper_limit", ":player_relation"),
(val_div, ":upper_limit", 2),
(val_add, ":upper_limit", 10),
(else_try),
(lt, ":player_relation", 0),
(assign, ":upper_limit", 0),
(try_end),
(val_mul, ":upper_limit", 3),
(store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
(val_div, ":upper_limit", ":amount_random_divider"),
(store_random_in_range, ":amount", 0, ":upper_limit"),
(party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"),
(party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
]),
но предупреждают,что необходимо дописать изменения в гейм_меню,я так полагаю в этом
(
"recruit_volunteers",0,
"{s18}",
"none",
[(party_get_slot, ":volunteer_troop", "$current_town", slot_center_volunteer_troop_type),
(party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(store_troop_gold, ":gold", "trp_player"),
(store_div, ":gold_capacity", ":gold", 10),#10 denars per man
(assign, ":party_capacity", ":free_capacity"),
(val_min, ":party_capacity", ":gold_capacity"),
(try_begin),
(gt, ":party_capacity", 0),
(val_min, ":volunteer_amount", ":party_capacity"),
(try_end),
(assign, reg5, ":volunteer_amount"),
(assign, reg7, 0),
(try_begin),
(gt, ":volunteer_amount", ":gold_capacity"),
(assign, reg7, 1), #not enough money
(try_end),
(try_begin),
(eq, ":volunteer_amount", 0),
(str_store_string, s18, "@No one here seems to be willing to join your party."),
(else_try),
(store_mul, reg6, ":volunteer_amount", 10),#10 denars per man
(str_store_troop_name_by_count, s3, ":volunteer_troop", ":volunteer_amount"),
(try_begin),
(eq, reg5, 1),
(str_store_string, s18, "@One {s3} volunteers to follow you."),
(else_try),
(str_store_string, s18, "@{reg5} {s3} volunteer to follow you."),
(try_end),
(set_background_mesh, "mesh_pic_recruits"),
(try_end),
],
[
("continue_not_enough_gold",
[
(eq, reg7, 1),
],
"I don't have enough money...",
[
(jump_to_menu,"mnu_village"),
]),
но мало ли я ошибаюсь,кто знает не откажите в помощи.