["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],
# Each troop contains the following fields: # 1) Troop id (string): used for referencing troops in other files. The prefix trp_ is automatically added before each troop-id . # 2) Toop name (string). # 3) Plural troop name (string). # 4) Troop flags (int). See header_troops.py for a list of available flags # 5) Scene (int) (only applicable to heroes) For example: scn_reyvadin_castle|entry(1) puts troop in reyvadin castle's first entry point # 6) Reserved (int). Put constant "reserved" or 0. # 7) Faction (int) # 8) Inventory (list): Must be a list of items # 9) Attributes (int): Example usage: # str_6|agi_6|int_4|cha_5|level(5) # 10) Weapon proficiencies (int): Example usage: # wp_one_handed(55)|wp_two_handed(90)|wp_polearm(36)|wp_archery(80)|wp_crossbow(24)|wp_throwing(45) # The function wp(x) will create random weapon proficiencies close to value x. # To make an expert archer with other weapon proficiencies close to 60 you can use something like: # wp_archery(160) | wp(60) # 11) Skills (int): See header_skills.py to see a list of skills. Example: # knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2 # 12) Face code (int): You can obtain the face code by pressing ctrl+E in face generator screen # 13) Face code (int)(2) (only applicable to regular troops, can be omitted for heroes): # The game will create random faces between Face code 1 and face code 2 for generated troops # 14) Troop image (string): If this variable is set, the troop will use an image rather than its 3D visual during the conversations
["npc_henry","Henry","Henry",tf_hero|tf_is_merchant, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots, itm_book_leadership,itm_hide_boots ],def_attrib|level(5),wp(20),knows_common,0x000000090000214136db6db6db6db6db00000000001db6db0000000000000000], ["npc_jacques","Jacques","Jacques",tf_hero|tf_is_merchant, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots, itm_book_leadership,itm_hide_boots ],def_attrib|level(5),wp(20),knows_common,0x000000090000214136db6db6db6db6db00000000001db6db0000000000000000], ["npc_jean","Jean","Jean",tf_hero|tf_is_merchant, 0, reserved, fac_commoners,[itm_cuir_bouilli,itm_plate_boots, itm_book_leadership,itm_hide_boots ],def_attrib|level(5),wp(20),knows_common,0x000000090000214136db6db6db6db6db00000000001db6db0000000000000000],
#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), ]),
(try_for_range, ":town_no", towns_begin, towns_end),
try_for_range = 6 # Works like a for loop from lower-bound up to (upper-bound - 1) # (try_for_range,<destination>,<lower_bound>,<upper_bound>),
(party_set_slot, ":town_no", slot_center_tavern_bookseller, 0),
slot_center_tavern_bookseller = 98
party_set_slot = 501 # (party_set_slot,<party_id>,<slot_no>,<value>),
(try_end),
(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),
(store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_bookseller, ":troop_no"),
store_random_in_range = 2136 # gets random number in range [range_low,range_high] excluding range_high # (store_random_in_range,<destination>,<range_low>,<range_high>),
tavern_minstrels_begin = "trp_tavern_minstrel_1" tavern_booksellers_begin = "trp_tavern_bookseller_1" tavern_booksellers_end = tavern_minstrels_begin slot_center_tavern_bookseller = 98
("update_npc", [(try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_tavern_npc, 0), (try_end), (try_for_range, ":troop_no", npc_begin, npc_end), (store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_tavern_npc, ":troop_no"), (try_end),
###nouvelles : slot_tavern_npc = 567 npc_begin = "trp_npc_henry" npc_end = tavern_minstrels_begin #changées : tavern_booksellers_begin = "trp_tavern_bookseller_1" tavern_booksellers_end = tavern_ministrels_begin ####devient : tavern_booksellers_begin = "trp_tavern_bookseller_1" tavern_booksellers_end = npc_begin
(set_visitor, numero_point_entree, personnage),
(party_get_slot, ":tavern_bookseller", "$current_town", slot_center_tavern_bookseller),
(try_begin), (party_get_slot, ":tavern_bookseller", "$current_town", slot_center_tavern_bookseller), (gt, ":tavern_bookseller", 0), (set_visitor, ":cur_entry", ":tavern_bookseller"), (val_add, ":cur_entry", 1), (try_end),
(try_begin), (party_get_slot, ":tavern_npc", "$current_town", slot_tavern_npc), (gt, ":tavern_npc", 0), (set_visitor, ":cur_entry", ":tavern_npc"), (val_add, ":cur_entry", 1), (try_end),
[anyone, "start", [(is_between, "$g_talk_troop", tavern_booksellers_begin, tavern_booksellers_end), ],
[anyone, "start", [(is_between, "$g_talk_troop", npc_begin, npc_end),(str_store_troop_name, s11, "$g_talk_troop"),], "I'm {s11}, and you ?", "my_npc_talk", []], [anyone|plyr, "my_npc_talk", [], "I am me. Bye.", "close_window", []],