(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_1_troop, "trp_drachenanwaerter"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_2_troop, "trp_drachenkrieger"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_3_troop, "trp_drachenwaechter"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_4_troop, "trp_drachenschuetze"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_tier_5_troop, "trp_drachenveteran"),
(faction_set_slot, "fac_culture_1", slot_faction_tier_1_troop, "trp_swadian_recruit"),
(faction_set_slot, "fac_culture_1", slot_faction_tier_2_troop, "trp_swadian_militia"),
(faction_set_slot, "fac_culture_1", slot_faction_tier_3_troop, "trp_swadian_footman"),
(faction_set_slot, "fac_culture_1", slot_faction_tier_4_troop, "trp_swadian_infantry"),
(faction_set_slot, "fac_culture_1", slot_faction_tier_5_troop, "trp_swadian_knight"),
(try_begin),
(neq, ":town_faction", "fac_player_supporters_faction"),
(faction_get_slot, ":troop_prison_guard", "$g_encountered_party_faction", slot_faction_prison_guard_troop),
(faction_get_slot, ":troop_castle_guard", "$g_encountered_party_faction", slot_faction_castle_guard_troop),
(faction_get_slot, ":tier_2_troop", ":town_faction", slot_faction_tier_2_troop),
(faction_get_slot, ":tier_3_troop", ":town_faction", slot_faction_tier_3_troop),
(else_try),
(party_get_slot, ":town_original_faction", "$current_town", slot_center_original_faction),
(faction_get_slot, ":troop_prison_guard", ":town_original_faction", slot_faction_prison_guard_troop),
(faction_get_slot, ":troop_castle_guard", ":town_original_faction", slot_faction_castle_guard_troop),
(faction_get_slot, ":tier_2_troop", ":town_original_faction", slot_faction_tier_2_troop),
(faction_get_slot, ":tier_3_troop", ":town_original_faction", slot_faction_tier_3_troop),
(try_end),
Harlef 说:
(try_begin),
(eq, ":party_faction", "fac_player_supporters_faction"),
(party_get_slot, ":town_lord", ":party_no", slot_town_lord),
(try_begin),
(gt, ":town_lord", 0),
(troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
(else_try),
(party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),
(try_end),
(try_end),
(faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_a),
(faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_b),
(faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_c),
(assign, ":party_template", 0),
(store_random_in_range, ":rand", 0, 100),
(try_begin),
(this_or_next|eq, ":party_type", spt_town),
(eq, ":party_type", spt_castle), #CASTLE OR TOWN
(try_begin),
(lt, ":rand", 65),
(assign, ":party_template", ":party_template_a"),
(else_try),
(assign, ":party_template", ":party_template_b"),
(try_end),
(else_try),
(eq, ":party_type", spt_kingdom_hero_party),
(try_begin),
(lt, ":rand", 50),
(assign, ":party_template", ":party_template_a"),
(else_try),
(lt, ":rand", 75),
(assign, ":party_template", ":party_template_b"),
(else_try),
(assign, ":party_template", ":party_template_c"),
(try_end),
(else_try),
(try_end),
(try_begin),
(gt, ":party_template", 0),
(party_add_template, ":party_no", ":party_template"),
(try_end),
]),
"hired_blade"
"mercenary_crossbowman"
"mercenary_cavalry"
(store_faction_of_party, ":center_faction", ":center_no"),
(try_begin),
(is_between, ":center_faction", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_get_slot, ":volunteer_troop", ":center_faction", slot_faction_tier_1_troop),
(else_try),
(eq, ":center_faction", "fac_player_supporters_faction"),
(assign, ":volunteer_troop", "trp_drachenanwaerter"),
(try_end),
#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),
## (try_begin),
## (eq, "$cheat_mode", 2),
## (str_store_party_name, s4, ":center_no"),
## (str_store_faction_name, s5, ":center_culture"),
## (display_message, "str_updating_volunteers_for_s4_faction_is_s5"),
## (try_end),
(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
(store_faction_of_party, ":center_faction", ":center_no"),
(try_begin),
(is_between, ":center_faction", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_get_slot, ":volunteer_troop", ":center_faction", slot_faction_tier_1_troop),
(else_try),
(eq, ":center_faction", "fac_player_supporters_faction"),
(assign, ":volunteer_troop", "trp_drachenanwaerter"),
(try_end),
(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),
(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),
(assign, ":upper_limit", 8),
(try_begin),
(ge, ":player_relation", 4),
(assign, ":upper_limit", ":player_relation"),
(val_div, ":upper_limit", 2),
(val_add, ":upper_limit", 6),
(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"),
]),
#script_update_npc_volunteer_troops_in_village
# INPUT: arg1 = center_no
# OUTPUT: none
("update_npc_volunteer_troops_in_village",
[
(store_script_param, ":center_no", 1),
(party_get_slot, ":center_culture", ":center_no", slot_center_culture),
(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
(store_faction_of_party, ":center_faction", ":center_no"),
(try_begin),
(is_between, ":center_faction", "fac_kingdom_1", "fac_kingdoms_end"),
(faction_get_slot, ":volunteer_troop", ":center_faction", slot_faction_tier_1_troop),
(else_try),
(eq, ":center_faction", "fac_player_supporters_faction"),
(assign, ":volunteer_troop", "trp_drachenanwaerter"),
(try_end),
(assign, ":volunteer_troop_tier", 1),
(try_for_range, ":unused", 0, 5),
(store_random_in_range, ":random_no", 0, 100),
(lt, ":random_no", 10),
(store_random_in_range, ":random_no", 0, 2),
(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),
(assign, ":upper_limit", 12),
(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_npc_volunteer_troop_type, ":volunteer_troop"),
(party_set_slot, ":center_no", slot_center_npc_volunteer_troop_amount, ":amount"),
]),
Stjef ljubavi 说:
irgent wie stell ich mich blöd an ich bekomm es nicht hin aber ich geb nicht aufDuh 说:
#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),
## (try_begin),
## (eq, "$cheat_mode", 2),
## (str_store_party_name, s4, ":center_no"),
## (str_store_faction_name, s5, ":center_culture"),
## (display_message, "str_updating_volunteers_for_s4_faction_is_s5"),
## (try_end),
(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),
(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),
(assign, ":upper_limit", 8),
(try_begin),
(ge, ":player_relation", 4),
(assign, ":upper_limit", ":player_relation"),
(val_div, ":upper_limit", 2),
(val_add, ":upper_limit", 6),
(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"),
]),
#script_update_npc_volunteer_troops_in_village
# INPUT: arg1 = center_no
# OUTPUT: none
("update_npc_volunteer_troops_in_village",
[
(store_script_param, ":center_no", 1),
(party_get_slot, ":center_culture", ":center_no", slot_center_culture),
(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
(assign, ":volunteer_troop_tier", 1),
(try_for_range, ":unused", 0, 5),
(store_random_in_range, ":random_no", 0, 100),
(lt, ":random_no", 10),
(store_random_in_range, ":random_no", 0, 2),
(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),
(assign, ":upper_limit", 12),
(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_npc_volunteer_troop_type, ":volunteer_troop"),
(party_set_slot, ":center_no", slot_center_npc_volunteer_troop_amount, ":amount"),
]),