Kinoheld said:
Caba`drin said:
Ghost of Razgriz said:
(str_store_party_name, s4, ":wealthiest_center"),
], "In terms of attacks on travellers, the town of {s4} is believed to be the most dangerous. Here in {s5}, we are less afflicted by bandits and raiders than {reg4} towns, and more afflicted than {reg5}. ", "mayor_pretalk",[
]],
#Malik Troop Recruit From Taverns
#giz me troobz
[anyone|plyr,"tavernkeeper_talk",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",1),
(store_troop_gold,":gold","trp_player"),
(ge,":gold",200),
], "I need to recruit some troops.", "ramun_buy",[]],
[anyone,"ramun_buy", [], "Of course. What kind would you like?", "ramun_faction",[]],
[anyone|repeat_for_factions|plyr,"ramun_faction",
[ (store_repeat_object, ":faction_no"),
(this_or_next|is_between, ":faction_no", kingdoms_begin, kingdoms_end),
(this_or_next|is_between, ":faction_no", "fac_commoners", "fac_neutral"),
(is_between, ":faction_no", "fac_manhunters", "fac_mountain_bandits"),
#(assign, reg1, ":faction_no"),
(try_begin),
(is_between, ":faction_no", npc_kingdoms_begin, kingdoms_end),
(faction_get_slot, ":str", ":faction_no", slot_faction_adjective),
(str_store_string, s2, ":str"),
(else_try),
(str_store_faction_name, s2, ":faction_no"),
(try_end),
], "Some {s2} please.", "ramun_select",
[(store_repeat_object, reg2),(str_store_faction_name, s2, reg2),]
],
[anyone|plyr,"ramun_faction",[], "Nevermind.", "tavernkeeper_pretalk", []],
[anyone,"ramun_select", [], "So you want some troops from the {s2}?", "ramun_troops",[]],
[anyone|repeat_for_troops|plyr,"ramun_troops",
[
(store_repeat_object, ":troop"),
(is_between, ":troop", regular_troops_begin, "trp_kidnapped_girl"),#eliminates a load
(store_faction_of_troop, ":faction", ":troop"),#eliminates the rest
(eq, ":faction", reg2),#by faction obviously
(neg|troop_is_hero, ":troop"),#patrol leaders
(str_store_troop_name, s3, ":troop"),
(assign,"$stroop",0),
],
"{s3}", "ramun_count", [(store_repeat_object,reg3),(str_store_faction_name, s3, reg2),(str_store_troop_name_plural,s4,reg3),(assign,"$stroop",reg3),]],
[anyone|plyr,"ramun_troops",[],"No, none of these. Let me see that faction list again.","ramun_buy",[]],
[anyone,"ramun_count",[],"How many {s4}?","ramun_crespond",[]],
[anyone|plyr,"ramun_crespond",[],"I shall return when I'm better prepared.","tavernkeeper_pretalk",[]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",1),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,1),
(ge,":gold",":cost"),
],"I'd like one.","ramun_buy_some",[(assign, "$tcost", 1),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",5),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,5),
(ge,":gold",":cost"),
],"I'd like five.","ramun_buy_some",[(assign, "$tcost", 5),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",10),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,10),
(ge,":gold",":cost"),
],"I'd like ten.","ramun_buy_some",[(assign, "$tcost", 10),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",20),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,20),
(ge,":gold",":cost"),
],"I'd like twenty.","ramun_buy_some",[(assign, "$tcost", 20),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",50),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,50),
(ge,":gold",":cost"),
],"I'd like fifty.","ramun_buy_some",[(assign, "$tcost", 50),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",100),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,100),
(ge,":gold",":cost"),
],"I'd like one hundred.","ramun_buy_some",[(assign, "$tcost", 100),]],
[anyone|plyr,"ramun_crespond",
[
(party_get_free_companions_capacity,":room","p_main_party"),
(ge,":room",300),
(store_troop_gold,":gold","trp_player"),
(call_script,"script_game_get_join_cost",reg3),
(store_mul,":cost",reg0,300),
(ge,":gold",":cost"),
],"I have no time for this tomfoolery! I need an army! I'll take three hundred!","ramun_buy_300",[(assign, "$tcost", 300),]],
[anyone,"ramun_buy_some",[], "Certainly.", "ramun_anythingelse",
[
(party_add_members, "p_main_party","$stroop","$tcost"),
(call_script,"script_game_get_join_cost",reg3),
(val_mul, "$tcost", reg0),
(troop_remove_gold, "trp_player", "$tcost"),
(assign, "$tcost", 0),
]
],
[anyone,"ramun_buy_300",[], "What a greedy {fulcher/queine} ye be! I do this only for thee.", "ramun_anythingelse",
[
(party_add_members, "p_main_party","$stroop","$tcost"),
(call_script,"script_game_get_join_cost",reg3),
(val_mul, "$tcost",reg0),
(troop_remove_gold, "trp_player", "$tcost"),
(assign, "$tcost", 0),
]
],
[anyone,"ramun_anythingelse",[],"What else?","ramun_demands",[]],
[anyone|plyr,"ramun_demands",[],"No, I'm done as thou hadst served well","tavernkeeper_pretalk",[]],
[anyone|plyr,"ramun_demands",[],"Yes, more of the same.","ramun_count",[]],
[anyone|plyr,"ramun_demands",[],"I would have another look at the list anew.","ramun_buy",[]],
# [anyone|plyr,"ramun_troops",[], "Let's try some other kind of grunts.", "ramun_buy", []],
#giz me troobz end
#Malik Troop Recruit From Taverns End
That's the way it always was, you'd have to ask Taleworlds for the exact specifics. The reason "regulars" i.e. troops have 3x the exp is because their EXP is earned for the whole stack of units of the same type, i.e. all 20 swadian recruits. So they need more exp to level up.Tasunke said:
Tasunke said:
# script_refresh_center_inventories
("refresh_center_inventories",
[
(set_merchandise_modifier_quality,150),
(reset_item_probabilities,100),
# Add trade goods to merchant inventories
(try_for_range,":cur_center",towns_begin, towns_end),
(party_get_slot,":cur_merchant",":cur_center",slot_town_merchant),
(reset_item_probabilities,100),
(assign, ":total_production", 0),
(try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
(call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
(assign, ":cur_production", reg0),
(try_for_range, ":cur_village", villages_begin, villages_end),
(party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
(call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
(val_div, reg0, 3),
(val_add, ":cur_production", reg0),
(try_end),
(val_max, ":cur_production", 1),
(val_mul, ":cur_production", 4),
(val_add, ":total_production", ":cur_production"),
(try_end),
(party_get_slot, ":town_prosperity", ":cur_center", slot_town_prosperity),
(assign, ":number_of_items_in_town", 25),
(try_begin), #1.0x - 2.0x (50 - 100 prosperity)
(ge, ":town_prosperity", 50),
(store_sub, ":ratio", ":town_prosperity", 50),
(val_mul, ":ratio", 2),
(val_add, ":ratio", 100),
(val_mul, ":number_of_items_in_town", ":ratio"),
(val_div, ":number_of_items_in_town", 100),
(else_try), #0.5x - 1.0x (0 - 50 prosperity)
(store_sub, ":ratio", ":town_prosperity", 50),
(val_add, ":ratio", 100),
(val_mul, ":number_of_items_in_town", ":ratio"),
(val_div, ":number_of_items_in_town", 100),
(try_end),
(val_clamp, ":number_of_items_in_town", 10, 40),
(try_begin),
(is_between, ":cur_center", castles_begin, castles_end),
(val_div, ":number_of_items_in_town", 2),
(try_end),
(try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end),
(call_script, "script_center_get_production", ":cur_center", ":cur_goods"),
(assign, ":cur_production", reg0),
(try_for_range, ":cur_village", villages_begin, villages_end),
(party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"),
(call_script, "script_center_get_production", ":cur_village", ":cur_goods"),
(val_div, reg0, 3),
(val_add, ":cur_production", reg0),
(try_end),
(val_max, ":cur_production", 1),
(val_mul, ":cur_production", 4),
(val_mul, ":cur_production", ":number_of_items_in_town"),
(val_mul, ":cur_production", 100),
(val_div, ":cur_production", ":total_production"),
(set_item_probability_in_merchandise, ":cur_goods", ":cur_production"),
(try_end),
(troop_clear_inventory, ":cur_merchant"),
(troop_add_merchandise, ":cur_merchant", itp_type_goods, ":number_of_items_in_town"),
(troop_ensure_inventory_space, ":cur_merchant", 20),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, ":cur_gold",":cur_merchant"),
(lt,":cur_gold",1500),
(store_random_in_range,":new_gold",500,1000),
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(try_end),
]),
# script_refresh_center_armories
("refresh_center_armories",
[
(reset_item_probabilities, 100),
(set_merchandise_modifier_quality, 150),
(try_for_range, ":cur_merchant", armor_merchants_begin, armor_merchants_end),
(store_sub, ":cur_town", ":cur_merchant", armor_merchants_begin),
(val_add, ":cur_town", towns_begin),
(troop_clear_inventory, ":cur_merchant"),
(party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_body_armor, 16),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_head_armor, 16),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_foot_armor, 8),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_hand_armor, 4),
(troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, reg6, ":cur_merchant"),
(lt, reg6, 1000),
(store_random_in_range, ":new_gold", 250, 500),
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(end_try),
]),
# script_refresh_center_weaponsmiths
("refresh_center_weaponsmiths",
[
(reset_item_probabilities, 100),
(set_merchandise_modifier_quality, 150),
(try_for_range, ":cur_merchant", weapon_merchants_begin, weapon_merchants_end),
(store_sub, ":cur_town", ":cur_merchant", weapon_merchants_begin),
(val_add, ":cur_town", towns_begin),
(troop_clear_inventory, ":cur_merchant"),
(party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_one_handed_wpn, 5),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_two_handed_wpn, 5),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_polearm, 5),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_shield, 6),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bow, 4),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_crossbow, 3),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_thrown, 5),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_arrows, 2),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bolts, 2),
(troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, reg6, ":cur_merchant"),
(lt, reg6, 1000),
(store_random_in_range, ":new_gold", 250, 500),
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(try_end),
]),
# script_refresh_center_stables
("refresh_center_stables",
[
(reset_item_probabilities, 100),
(set_merchandise_modifier_quality, 150),
(try_for_range, ":cur_merchant", horse_merchants_begin, horse_merchants_end),
(troop_clear_inventory, ":cur_merchant"),
(store_sub, ":cur_town", ":cur_merchant", horse_merchants_begin),
(val_add, ":cur_town", towns_begin),
(party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
(troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_horse, 5),
(troop_ensure_inventory_space, ":cur_merchant", 65),
(troop_sort_inventory, ":cur_merchant"),
(store_troop_gold, ":cur_gold", ":cur_merchant"),
(lt, ":cur_gold", 600),
(store_random_in_range, ":new_gold", 250, 500),
(call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
(try_end),
]),
# Tavern traveler.
["tavern_bookseller_1","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots,
itm_book_tactics, itm_book_persuasion, itm_book_wound_treatment_reference, itm_book_leadership,
itm_book_intelligence, itm_book_training_reference, itm_book_surgery_reference],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2],
["tavern_bookseller_2","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots,
itm_book_wound_treatment_reference, itm_book_leadership, itm_book_intelligence, itm_book_trade,
itm_book_engineering, itm_book_weapon_mastery],def_attrib|level(5),wp(20),knows_common,merchant_face_1, merchant_face_2],
#script_update_booksellers
# INPUT: none
# OUTPUT: none
("update_booksellers",
[(try_for_range, ":town_no", towns_begin, towns_end),
(party_set_slot, ":town_no", slot_center_tavern_bookseller, 0),
(try_end),
(try_for_range, ":troop_no", tavern_booksellers_begin, tavern_booksellers_end),
(store_random_in_range, ":town_no", towns_begin, towns_end),
(party_set_slot, ":town_no", slot_center_tavern_bookseller, ":troop_no"),
(try_end),
]),
xaliber said: