Has anybody figured out how to get mercenaries back into taverns? Somebody suggested that the problem is a slot conflict between the mercenary update script and the npc volunteer update script, but I can't figure out which slot it could be.
simple_triggers must be look like:TheCaitularity said:Has anybody figured out how to get mercenaries back into taverns? Somebody suggested that the problem is a slot conflict between the mercenary update script and the npc volunteer update script, but I can't figure out which slot it could be.
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
#(call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", villages_begin, villages_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
# (call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", centers_begin, centers_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
#(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
Mispronounced said:Wait, you guys got this to work? I can't even get the first part to work. What did you do to fix it?
frozenpainter said:simple_triggers must be look like:TheCaitularity said:Has anybody figured out how to get mercenaries back into taverns? Somebody suggested that the problem is a slot conflict between the mercenary update script and the npc volunteer update script, but I can't figure out which slot it could be.
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
#(call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", villages_begin, villages_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
# (call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", centers_begin, centers_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
#(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
#script_cf_castle_recruit_elite_cond
# INPUT: none
# OUTPUT: none
("cf_castle_recruit_elite_cond",
[(party_get_slot,":town_faction","$g_encountered_party",slot_center_ex_faction),#you are the same faction as the town.
(eq,":town_faction","$players_kingdom"),
#[(store_faction_of_party, ":town_faction", "$current_town"),
# (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
# (store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
# (ge, ":center_relation", 0),
# (this_or_next|ge, ":center_relation", 5),
# (this_or_next|eq, ":town_faction", "$players_kingdom"),
# (this_or_next|ge, ":town_faction_relation", 0),
# (this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
# ( eq, "$players_kingdom", 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
]),
]),
frozenpainter said:simple_triggers must be look like:TheCaitularity said:Has anybody figured out how to get mercenaries back into taverns? Somebody suggested that the problem is a slot conflict between the mercenary update script and the npc volunteer update script, but I can't figure out which slot it could be.
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
#(call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", villages_begin, villages_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
# (call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", centers_begin, centers_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
#(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
Slavos said:frozenpainter said:simple_triggers must be look like:TheCaitularity said:Has anybody figured out how to get mercenaries back into taverns? Somebody suggested that the problem is a slot conflict between the mercenary update script and the npc volunteer update script, but I can't figure out which slot it could be.
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
#(call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", villages_begin, villages_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
(72,
[
(call_script, "script_update_mercenary_units_of_towns"),
# (call_script, "script_start_update_mercenary_units_of_towns"),
#NPC changes begin
# removes (call_script, "script_update_companion_candidates_in_taverns"),
#NPC changes end
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(call_script, "script_update_villages_infested_by_bandits"),
(try_for_range, ":village_no", centers_begin, centers_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
#(call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"),
(try_end),
]),
Check this
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Imported 27 global variables for saved-game compatability that are not used.
Exporting postfx_params...
______________________________
Script processing has ended.
Press any key to exit. . .
#script_cf_town_castle_recruit_volunteers_cond
# INPUT: none
# OUTPUT: none
("cf_town_castle_recruit_volunteers_cond",
[(store_faction_of_party, ":town_faction", "$current_town"),
(party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
(store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
(ge, ":center_relation", 0),
(this_or_next|ge, ":center_relation", 5),
(this_or_next|eq, ":town_faction", "$players_kingdom"),
(this_or_next|ge, ":town_faction_relation", 0),
(this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
( eq, "$players_kingdom", 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
]),
#script_cf_town_recruit_volunteers_cond
# INPUT: none
# OUTPUT: none
("cf_town_recruit_volunteers_cond", #renamed
[(store_faction_of_party, ":town_faction", "$current_town"),
(party_get_slot, ":center_relation", "$current_town", slot_center_player_relation),
(store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"),
(ge, ":center_relation", 0),
(this_or_next|ge, ":center_relation", 5),
(this_or_next|eq, ":town_faction", "$players_kingdom"),
(this_or_next|ge, ":town_faction_relation", 0),
(this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"),
( eq, "$players_kingdom", 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0),
(party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(ge, ":free_capacity", 1),
]),]
#script_town_castle_recruit_nobles_recruit
# INPUT: none
# OUTPUT: none
("town_castle_recruit_nobles_recruit",
[(store_faction_of_party, ":cur_faction", "$current_town"),
(faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_5_troop),
(party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, ":volunteer_amount", ":free_capacity"),
(store_troop_gold, ":gold", "trp_player"),
(store_div, ":gold_capacity", ":gold", 200),#200 denars per man
(val_min, ":volunteer_amount", ":gold_capacity"),
(party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"),
(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
(store_mul, ":cost", ":volunteer_amount", 200),#200 denars per man
(troop_remove_gold, "trp_player", ":cost"),
]),
#script_town_recruit_nobles_recruit
# INPUT: none
# OUTPUT: none
("town_recruit_nobles_recruit", #renamed
[(store_faction_of_party, ":cur_faction", "$current_town"),
(faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_1_troop), #changed tier so it wouldnt recruit nobles.
(party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
(party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
(val_min, ":volunteer_amount", ":free_capacity"),
(store_troop_gold, ":gold", "trp_player"),
(store_div, ":gold_capacity", ":gold", 50),#50 denars per man
(val_min, ":volunteer_amount", ":gold_capacity"),
(party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"),
(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
(store_mul, ":cost", ":volunteer_amount", 50),#50 denars per man
(troop_remove_gold, "trp_player", ":cost"),
]),
("recruit_nobles",[(call_script, "script_cf_town_castle_recruit_volunteers_cond"),]
,"Recruit Nobles.",
[
(try_begin),
(call_script, "script_cf_enter_center_location_bandit_check"),
(else_try),
(jump_to_menu, "mnu_recruit_nobles"),
(try_end),
("recruit_normals",[(is_between, "$current_town",
towns_begin, towns_end), (call_script, "script_cf_town_recruit_volunteers_cond"),]
,"Recruit Volunteers.",
[
(try_begin),
(call_script, "script_cf_enter_center_location_bandit_check"),
(else_try),
(jump_to_menu, "mnu_recruit_normales"),
(try_end),
]),[code]
[code] ( "recruit_nobles",0,
"{s18}",
"none",
[(store_faction_of_party, ":cur_faction", "$current_town"),
(faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_5_troop),
(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", 40),#40 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", 40),#40 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_town"),
]),
("continue",
[
(eq, reg7, 0),
(eq, reg5, 0),
], #noone willing to join
"Continue...",
[
(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
(jump_to_menu, "mnu_town"),
]),
("recruit_them",
[
(eq, reg7, 0),
(gt, reg5, 0),
],
"Recruit them ({reg6} denars).",
[
(call_script, "script_town_castle_recruit_nobles_recruit"),
(jump_to_menu, "mnu_town"),
]),
("forget_it",
[
(eq, reg7, 0),
(gt, reg5, 0),
],
"Forget it.",
[
(jump_to_menu, "mnu_town"),
]),
],
),
( "recruit_normales",0,
"{s18}",
"none",
[(store_faction_of_party, ":cur_faction", "$current_town"),
(faction_get_slot, ":volunteer_troop", ":cur_faction", slot_faction_tier_1_troop), #Notice the changed tier
(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", 40),#40 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", 40),#40 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_town"),
]),
("continue",
[
(eq, reg7, 0),
(eq, reg5, 0),
], #noone willing to join
"Continue...",
[
(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
(jump_to_menu, "mnu_town"),
]),
("recruit_them",
[
(eq, reg7, 0),
(gt, reg5, 0),
],
"Recruit them ({reg6} denars).",
[
(call_script, "script_town_castle_recruit_nobles_recruit"),
(jump_to_menu, "mnu_town"),
]),
("forget_it",
[
(eq, reg7, 0),
(gt, reg5, 0),
],
"Forget it.",
[
(jump_to_menu, "mnu_town"),
]),
],
),
i followed Ritter Dummbatz post and edited so i wouldnt have to wait the the three days.Totenkopf900 said:you have to wait 3 days in game or follow the the first post in this tutorial
Totenkopf900 said:Does anyone know how to make so troops can only be recruited if the player belong to the troop faction?
Edit- manage to make it work, here are the changes i have made
Code:#script_cf_castle_recruit_elite_cond # INPUT: none # OUTPUT: none ("cf_castle_recruit_elite_cond", [(party_get_slot,":town_faction","$g_encountered_party",slot_center_ex_faction),#you are the same faction as the town. (eq,":town_faction","$players_kingdom"), #[(store_faction_of_party, ":town_faction", "$current_town"), # (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation), # (store_relation, ":town_faction_relation", ":town_faction", "fac_player_faction"), # (ge, ":center_relation", 0), # (this_or_next|ge, ":center_relation", 5), # (this_or_next|eq, ":town_faction", "$players_kingdom"), # (this_or_next|ge, ":town_faction_relation", 0), # (this_or_next|eq, ":town_faction", "$supported_pretender_old_faction"), # ( eq, "$players_kingdom", 0), (party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0), (party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (ge, ":free_capacity", 1), ]), ]),