castles_begin = "p_castle_1"
villages_begin = "p_village_1"
towns_end = castles_begin
castles_end = villages_begin
villages_end = "p_salt_mine"
walled_centers_begin = towns_begin
walled_centers_end = castles_end
centers_begin = towns_begin
centers_end = villages_end
training_grounds_begin = "p_training_ground_1"
training_grounds_end = "p_Bridge_1"
scenes_begin = "scn_town_1_center"
scenes_end = "scn_castle_1_exterior"
spawn_points_begin = "p_zendar"
spawn_points_end = "p_spawn_points_end"
regular_troops_begin = "trp_novice_fighter"
regular_troops_end = "trp_tournament_master"
swadian_merc_parties_begin = "p_town_1_mercs"
swadian_merc_parties_end = "p_town_8_mercs"
vaegir_merc_parties_begin = "p_town_8_mercs"
vaegir_merc_parties_end = "p_zendar"
# Merc Camp Begin
mercenary_camp_begin = "p_merc_camp_geroia"
mercenary_camp_end = "p_merc_camp_end"
# Merc Camp End
arena_masters_begin = "trp_town_1_arena_master"
arena_masters_end = "trp_town_1_armorer"
# Merc Camp Begin
( "mercenary_camp",0,
"You approach the mercenary camp...",
"none",
[],
[
("enter_geroian_camp",[(eq, "$g_encountered_party", "p_merc_camp_geroia"),],"Visit the Geroian Camp.",[
(modify_visitors_at_site,"scn_geroian_camp"),
(reset_visitors),
(assign, "$g_mt_mode", tcm_default),
(set_jump_entry, 1),
(set_visitor, 2, "trp_vernid"),
(set_visitor, 5, "trp_geroia_sergeant"),
(set_visitor, 6, "trp_geroia_swordsman"),
(set_visitor, 7, "trp_geroia_swordsman"),
(set_visitor, 8, "trp_geroia_pavisier"),
(set_visitor, 9, "trp_geroia_pavisier"),
(set_jump_mission,"mt_visit_town_castle"),
(jump_to_scene,"scn_geroian_camp"),
(change_screen_mission),
]),
("enter_balion_camp",[(eq, "$g_encountered_party", "p_merc_camp_balion"),],"Enter the castle of the Knights of Balion.",[
(modify_visitors_at_site,"scn_balion_camp"),
(reset_visitors),
(assign, "$g_mt_mode", tcm_default),
(set_jump_entry, 1),
(set_visitor, 2, "trp_kornwall"),
(set_visitor, 5, "trp_balion_knight"),
(set_visitor, 6, "trp_balion_infantry"),
(set_visitor, 7, "trp_balion_infantry"),
(set_visitor, 8, "trp_balion_longbowman"),
(set_visitor, 9, "trp_balion_longbowman"),
(set_jump_mission,"mt_visit_town_castle"),
(jump_to_scene,"scn_balion_camp"),
(change_screen_mission),
]),
("enter_jumne_camp",[(eq, "$g_encountered_party", "p_merc_camp_jumne"),],"Enter the Northmen camp.",[
(modify_visitors_at_site,"scn_jumne_camp"),
(reset_visitors),
(assign, "$g_mt_mode", tcm_default),
(set_jump_entry, 1),
(set_visitor, 2, "trp_sverre"),
(set_visitor, 5, "trp_jumne_huscarl"),
(set_visitor, 6, "trp_jumne_raider"),
(set_visitor, 7, "trp_jumne_raider"),
(set_visitor, 8, "trp_jumne_raider"),
(set_visitor, 9, "trp_jumne_skirmisher"),
(set_jump_mission,"mt_visit_town_castle"),
(jump_to_scene,"scn_jumne_camp"),
(change_screen_mission),
]),
("enter_zendar_camp",[(eq, "$g_encountered_party", "p_merc_camp_zendar"),],"Enter the ruins of Zendar.",[
(modify_visitors_at_site,"scn_zendar_camp"),
(reset_visitors),
(assign, "$g_mt_mode", tcm_default),
(set_jump_entry, 1),
(set_visitor, 2, "trp_stavros"),
(set_visitor, 5, "trp_slaver_chief"),
(set_visitor, 6, "trp_manhunter"),
(set_visitor, 7, "trp_manhunter"),
(set_visitor, 8, "trp_manhunter"),
(set_visitor, 9, "trp_manhunter"),
(set_jump_mission,"mt_visit_town_castle"),
(jump_to_scene,"scn_zendar_camp"),
(change_screen_mission),
]),
("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]),
]
),
# Merc Camp End
( "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"),
]),
],
),
yeah ill post it in a bitSeek n Destroy said:
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...
WARNING: Global variable never used: faction_display
WARNING: Global variable never used: kaos_disabled
Imported 21 global variables for saved-game compatability that are not used.
Exporting postfx_params...
______________________________
Script processing has ended.
Press any key to exit. . .
(call_script, "script_update_mercenary_units_of_towns"),
(call_script, "script_update_companion_candidates_in_taverns"),
(call_script, "script_update_ransom_brokers"),
(call_script, "script_update_tavern_travellers"),
(call_script, "script_update_tavern_minstrels"),
(call_script, "script_update_booksellers"),
(try_for_range, ":village_no", villages_begin, villages_end),
(call_script, "script_update_volunteer_troops_in_village", ":village_no"),
(try_end),
# Merc Camp Begin
(try_for_range, ":camp_no", mercenary_camp_begin, mercenary_camp_end),
(call_script, "script_refresh_mercenary_camp_troops",":camp_no"),
(try_end),
# Merc Camp End
(try_begin),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_town),
(jump_to_menu, "mnu_castle_outside"),
(else_try),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle),
(jump_to_menu, "mnu_castle_outside"),
(else_try),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_ship),
(jump_to_menu, "mnu_ship_reembark"),
(else_try),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_village),
(jump_to_menu, "mnu_village"),
(else_try),
(party_slot_eq, "$g_encountered_party", slot_party_type, spt_cattle_herd),
(jump_to_menu, "mnu_cattle_herd"),
(else_try),
(is_between, "$g_encountered_party", training_grounds_begin, training_grounds_end),
(jump_to_menu, "mnu_training_ground"),
(else_try),
(party_get_template_id, ":template", "$g_encountered_party"),
(ge, ":template", "pt_steppe_bandit_lair"),
(lt, ":template", "pt_bandit_lair_templates_end"),
(assign, "$loot_screen_shown", 0),
# (call_script, "script_encounter_init_variables"),
(jump_to_menu, "mnu_bandit_lair"),
(else_try),
(eq, "$g_encountered_party", "p_zendar"),
(jump_to_menu, "mnu_zendar"),
(else_try),
(eq, "$g_encountered_party", "p_salt_mine"),
(jump_to_menu, "mnu_salt_mine"),
(else_try),
(eq, "$g_encountered_party", "p_four_ways_inn"),
(jump_to_menu, "mnu_four_ways_inn"),
(else_try),
(eq, "$g_encountered_party", "p_test_scene"),
(jump_to_menu, "mnu_test_scene"),
(else_try),
(eq, "$g_encountered_party", "p_battlefields"),
(jump_to_menu, "mnu_battlefields"),
(else_try),
(eq, "$g_encountered_party", "p_training_ground"),
(jump_to_menu, "mnu_tutorial"),
(else_try),
(eq, "$g_encountered_party", "p_camp_bandits"),
(jump_to_menu, "mnu_camp"),
# Merc Camp Begin
(else_try),
(is_between, "$g_encountered_party", mercenary_camp_begin, mercenary_camp_end),
(jump_to_menu, "mnu_mercenary_camp"),
# Merc Camp End
# Merc Camp Begin
# script_refresh_mercenary_camp_troops
# Input: arg1 = camp_no
# Output: none
("refresh_mercenary_camp_troops",
[
(store_script_param_1, ":camp_no"),
(assign, ":ideal_size", 50), # Limit of Mercenary troops available in one camp
(try_begin),
(eq, ":camp_no", "p_merc_camp_geroia"),
(assign, ":party_template", "pt_merc_camp_geroia_troops"),
(else_try),
(eq, ":camp_no", "p_merc_camp_balion"),
(assign, ":party_template", "pt_merc_camp_balion_troops"),
(else_try),
(eq, ":camp_no", "p_merc_camp_jumne"),
(assign, ":party_template", "pt_merc_camp_jumne_troops"),
(else_try),
(eq, ":camp_no", "p_merc_camp_zendar"),
(assign, ":party_template", "pt_merc_camp_zendar_troops"),
(try_end),
(try_begin),
(party_get_num_companions, ":party_size", ":camp_no"),
(lt, ":party_size", ":ideal_size"),
(party_add_template, ":camp_no", ":party_template"),
(try_end),
]),
# Merc Camp End
i tried that still no luckSeek n Destroy said:
sorry i figured it out i placed the second line of scripts code in the wrong placeTotenkopf900 said:
here you go good sir lolTotenkopf900 said:
###################################################################################################
# Prisoner Talk - Originally written by Leprechaun, majorly overhauled & extended by Mordachai
###################################################################################################
# this is a dummy dialog - it sets up the globals we need
[anyone|plyr, "prisoner_chat", [
(store_conversation_troop,"$g_talk_troop"),
(store_troop_faction,"$g_talk_troop_faction","$g_talk_troop"),
(store_relation, "$g_talk_troop_faction_relation", "$g_talk_troop_faction", "fac_player_faction"),
(call_script, "script_troop_get_player_relation", "$g_talk_troop"),
(assign, "$g_talk_troop_relation", reg0),
(eq, 1, 0)
], "", "close_window", []],
# the following is intended to catch when you free up space for a prisoner that already agreed to join you
[anyone|plyr, "prisoner_chat", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 1),(troops_can_join, 1)], "All right, I have made room for you.", "prisoner_chat_accept_confirm", []],
[anyone, "prisoner_chat_accept_confirm", [], "I am at your command, my {lord/lady}.", "prisoner_chat_accept3", []],
# and we catch the case where you still don't have any room for a pending conscripted prisoner
[anyone|plyr, "prisoner_chat", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 1),(neg|troops_can_join, 1)], "I am sorry, I still have no room for you. You'll have to wait a while longer.", "close_window",[]],
# default entry (no prior join agreement, or they've previously refused)
[anyone|plyr, "prisoner_chat", [(neg|troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_hero)], "You there!", "prisoner_chat_commoner", []],
[anyone|plyr, "prisoner_chat", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_hero),(str_store_troop_name, s1, "$g_talk_troop")], "{s1}", "prisoner_chat_lord", []],
# reaction to you based on noble or low-birth
[anyone, "prisoner_chat_commoner", [], "Me?! (Gulp!)", "prisoner_chat_menu",[]],
[anyone, "prisoner_chat_lord", [(str_store_troop_name, s1, "trp_player")], "Yes, {Lord/Lady} {s1}?", "prisoner_chat_noble",[]],
# nobles chat begin
[anyone|plyr,"prisoner_chat_noble", [], "You are free to go.", "prisoner_chat_noble_prerelease",[]],
[anyone|plyr,"prisoner_chat_noble", [], "You will remain my prisoner.", "prisoner_chat_noble_prekeep",[]],
[anyone|plyr,"prisoner_chat_noble", [(gt, "$players_kingdom", 0)], "You have committed high treason!", "prisoner_chat_treason",[]],
[anyone|plyr,"prisoner_chat_noble_prerelease", [], "Despite what you may have heard, I am a {man/woman} of honor. You are free to go.", "prisoner_chat_noble_release", []],
[anyone, "prisoner_chat_noble_release", [], "I will not forget this act of Chivalry!", "close_window",
[
# remove the troop from prison
(call_script, "script_remove_troop_from_prison", "$g_talk_troop"),
(party_remove_prisoners, "p_main_party", "$g_talk_troop", 1),
# determine how much honor and faction relation change this prisoner is worth
(try_begin),
# king
(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
(assign, ":honor", 5),
(assign, ":fac_reln", 15),
(else_try),
# other lord
(assign, ":honor", 2),
(assign, ":fac_reln", 5),
(try_end),
# give the player their honor, faction relation, and lord relation change
(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 10),
(call_script, "script_change_player_honor", ":honor"),
(call_script, "script_change_player_relation_with_faction", "$g_talk_troop_faction", ":fac_reln" ),
]],
[anyone|plyr,"prisoner_chat_noble_prekeep", [], "You will understand if I keep you hostage until your family can afford to... compensate me for certain expenses and hardships I have endured to keep you fed and ...safe... these past weeks.", "prisoner_chat_noble_keep",[]],
[anyone, "prisoner_chat_noble_keep", [(ge, "$player_honor", 10),(ge, "$g_talk_troop_relation", 0)], "Truly, this is beneath you.", "close_window",[]],
[anyone, "prisoner_chat_noble_keep", [], "And I trust you will be as understanding when I hunt you down like the dog you are!", "close_window",[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1)]],
# commoners chat begin
[anyone|plyr,"prisoner_chat_menu", [], "Hmmm... perhaps you're not as stupid as the rest of those rabble.", "prisoner_chat_offer",[]],
[anyone|plyr,"prisoner_chat_menu", [], "As wretched as you are, I cannot help but feel sorry for you.", "prisoner_chat_release",[]],
[anyone|plyr,"prisoner_chat_menu", [], "The sight of you makes me sick! You.. Die.. Now!", "prisoner_chat_die1",[]],
[anyone|plyr,"prisoner_chat_menu", [], "Get back in line, Scum!", "close_window",[]],
[anyone|plyr,"prisoner_chat_release", [], "I'm feeling magnanimous today. Begone, before I change my mind!", "prisoner_chat_release2", []],
[anyone, "prisoner_chat_release2", [], "Oh, thank you, {sir/madam}. Blessings on you!", "close_window",
[(remove_troops_from_prisoners, "$g_talk_troop", 1),(call_script, "script_change_player_honor", 1)]],
[anyone|plyr,"prisoner_chat_offer", [], "Listen, scum, you have one last chance to redeem yourself before I sell you to the slave-traders. "\
"Drop all your previous allegiances and swear fealty to me, obey my every order to the letter, and you'll be paid, fed and equipped. "\
"If you don't....well, let's just say that life as a slave will be seemingly unending years of agony, malnutrition and beatings. "\
"I'd advise you to think very, very carefully before choosing. ", "prisoner_chat_reaction",
[(call_script, "script_determine_prisoner_agreed", "$g_talk_troop", "$g_talk_troop_faction_relation")]],
[anyone, "prisoner_chat_reaction", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 1)], "Thank you for your mercy, {sir/madam}. I swear on my mothers grave I will serve you, my {lord/lady}!","prisoner_chat_accept1",[]],
[anyone, "prisoner_chat_reaction", [], "I'll show you what I think of your offer! (The prisoner spits at your feet) There. Now get lost, I'm not interested.", "prisoner_chat_refuse",[]],
[anyone|plyr,"prisoner_chat_refuse", [], "I see...", "prisoner_chat_menu",[]],
[anyone|plyr,"prisoner_chat_die1", [], "(You advance on the prisoner...)", "prisoner_chat_die2",[]],
[anyone, "prisoner_chat_die2", [], "Please, {sir/madam}, don't kill me. I am a defenceless prisoner. Surely you're not that cruel?", "prisoner_chat_die3",[]],
[anyone|plyr,"prisoner_chat_die3", [], "(Kill the prisoner)", "prisoner_chat_die4",[]],
[anyone|plyr,"prisoner_chat_die3", [], "No, I will not sink that low.", "close_window",[]],
[anyone|plyr,"prisoner_chat_die4", [], "(The prisoner struggles against his shackles, desperate to free himself and escape you, but to no avail. You slit their throat with a knife and watch, satisfied, as his corpse sags to the floor.)", "close_window",
[(remove_troops_from_prisoners, "$g_talk_troop", 1),
(call_script, "script_change_player_honor", -1)]],
[anyone|plyr, "prisoner_chat_accept1", [], "If you so much as fail to tremble on my command, I will have you severely disciplined!", "prisoner_chat_accept2",[]],
[anyone|plyr, "prisoner_chat_accept1", [], "In my camp we are all treated as equals. I expect your obedience, but also your trust.", "prisoner_chat_accept2",[]],
[anyone, "prisoner_chat_accept2", [], "I will obey your wishes, my {lord/lady}. I swear!", "prisoner_chat_accept3",[]],
[anyone|plyr, "prisoner_chat_accept3", [(neg|troops_can_join, 1)], "Oh! Apparently there isn't enough room for you in my party. I will be back when I have made space.", "close_window", []],
[anyone|plyr, "prisoner_chat_accept3", [(troops_can_join, 1)], "Excellent. Report to the quartermaster for provisions and equiment. There is hard fighting ahead.", "close_window",
[(troop_set_slot, "$g_talk_troop", slot_prisoner_agreed, 0),
(remove_troops_from_prisoners, "$g_talk_troop",1),
(party_add_members, "p_main_party", "$g_talk_troop", 1),
(call_script, "script_change_troop_renown", "trp_player", 1),]],
[anyone|plyr, "prisoner_chat_treason", [(str_store_troop_name, s1, "$g_talk_troop"), (str_store_faction_name, s2, "$players_kingdom")],
"{s1}, you have committed cimes against the {s2}, for which you will now stand trial.^How plead you?", "prisoner_chat_treason_plead",
[
# determine the noble's reaction to this accusation
(store_random_in_range, reg0, 1, 5),#bug: must set upper number one higher to actually generate correct range
#TODO: weight the reaction according to the renown? Or at least according to king or not...
(troop_set_slot, "$g_talk_troop", slot_prisoner_agreed, reg0),
]
],
[anyone, "prisoner_chat_treason_plead", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 1),],
"Please have mercy upon my soul. All I have done, I have done in the name of my King and Country! I am but a patriot, as you, and I deserve your respect, if nothing else.", "prisoner_chat_treason_choose", []],
[anyone, "prisoner_chat_treason_plead", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 2),],
"You are gravely mistaken! I am an honorable Lord, and I have done nothing that you would not do were our roles exchanged.", "prisoner_chat_treason_choose", []],
[anyone, "prisoner_chat_treason_plead", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 3),],
"I spit on you and yours! You are but a cur come to put on airs, as though you were Noble and had any right whatsoever to judge me! Me! You are a nothing but a common brigand and a coward! I do not bow to you. You should drop to your knees and beg *my* forgiveness!", "prisoner_chat_treason_choose", []],
[anyone, "prisoner_chat_treason_plead", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 4),],
"You dare accuse me?! You sniveling whelpling! I should see you flogged and put in chains in one of my prisons for your insolence!", "prisoner_chat_treason_choose", []],
[anyone|plyr, "prisoner_chat_treason_choose", [], "I am a {man/woman} of honor. I shall spare your life this day!", "prisoner_chat_treason_not_guilty",
[
#TODO: have the relation with the prison have a mixed (random) result - relief, anger, etc, which dictates their final monologue to the player before exiting the dialog
# make sure we don't try to recruit this prisoner later!
(troop_set_slot, "$g_talk_troop", slot_prisoner_agreed, 0),
]
],
[anyone, "prisoner_chat_treason_not_guilty", [(str_store_troop_name, s1, "trp_player")], "There is yet hope for you, {s1}.", "close_window", []],
[anyone|plyr, "prisoner_chat_treason_choose", [], "You do not deserve leiniency. You must pay for your crimes with your life.", "prisoner_chat_treason_guilty", []],
[anyone|plyr, "prisoner_chat_treason_guilty", [], "For your many crimes against {s1}, I hereby sentence you to death, to be carried out immediately. Have you any final words to say?", "prisoner_chat_treason_final_words",
[(store_random_in_range, reg0, 1, 6), (troop_set_slot, "$g_talk_troop", slot_prisoner_agreed, reg0)]],
[anyone, "prisoner_chat_treason_final_words", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 1)], "I believe you will one day come to regret your actions. There is only one who is worthy to decide another's fate... and that one is not you.", "prisoner_chat_treason_execute", []],
[anyone, "prisoner_chat_treason_final_words", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 2)], "You are a coward and a dog! May your soul rot eternal, damn you!", "prisoner_chat_treason_execute", []],
[anyone, "prisoner_chat_treason_final_words", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 3)], "Winter's mortality,^locked in frozen indifference,^melts with Spring's rebirth.", "prisoner_chat_treason_execute", []],
[anyone, "prisoner_chat_treason_final_words", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 4)], "You will find no peace on this earth! I shall haunt thee eternal! Unto death you will find nothing but unhappiness and fear. And beyond... only torture and pain!", "prisoner_chat_treason_execute", []],
[anyone, "prisoner_chat_treason_final_words", [(troop_slot_eq, "$g_talk_troop", slot_prisoner_agreed, 5)], "Who are you?^A day passes^We are but children", "prisoner_chat_treason_execute", []],
[anyone|plyr, "prisoner_chat_treason_execute", [],
"(The prisoner struggles against his shackles, desperate to free himself and escape you, but to no avail. You slit his throat and watch, satisfied, as his corpse sags to the floor.)",
"close_window",
[
# attempt to allow the player to see the consequences of their actions
#(set_show_messages, 1), # this not only fails - but messages are hereafter disabled in the main game...
# make sure we don't try to recruit this prisoner stack later!
(troop_set_slot, "$g_talk_troop", slot_prisoner_agreed, 0),
# "kill" the NPC - force the 48 hr respawn kingdom heros trigger to ignore this troop (no party will be created for this troop, ever again)
# [q.v. script_create_kingdom_hero_party]
(troop_set_slot, "$g_talk_troop", slot_troop_occupation, slto_dead),
# remove them from their faction
(troop_set_slot, "$g_talk_troop", slot_troop_change_to_faction, "fac_no_faction"),
(troop_set_slot, "$g_talk_troop", slot_troop_original_faction, "fac_no_faction"),
# determine the penalty for this act (based on the honor of the troop they've killed)
(troop_get_slot, ":impact", "$g_talk_troop", slot_troop_renown),
(val_div, ":impact", -33),
(store_div, ":half", ":impact", 2),
# reduce the player's relationship with every village, town, and castle
(try_for_range, ":center", centers_begin, centers_end),
(store_faction_of_party, ":faction", ":center"),
(store_relation, ":relation", ":faction", "$g_talk_troop_faction"),
(try_begin),
(le, ":relation", -10),
# enemies, half impact
(call_script, "script_change_player_relation_with_center", ":center", ":half"),
(else_try),
# not at war, full impact
(call_script, "script_change_player_relation_with_center", ":center", ":impact"),
(try_end),
(try_end),
# reduce the player's relationship with every hero, companion, lady, and daughter
(try_for_range, ":troop", trp_npc1, trp_heroes_end),
# don't make the dead any angrier than they already are!
(neg|troop_slot_eq, ":troop", slot_troop_occupation, slto_dead),
(store_troop_faction, ":faction", ":troop"),
(store_relation, ":relation", ":faction", "$g_talk_troop_faction"),
(try_begin),
(le, ":relation", -10),
# enemies, half impact
(call_script, "script_change_player_relation_with_troop", ":troop", ":half"),
(else_try),
# not at war, full impact
(call_script, "script_change_player_relation_with_troop", ":troop", ":impact"),
(try_end),
(try_end),
# reduce the player's relationship with every faction (enemies 1/2 as much)
(try_for_range, ":faction", kingdoms_begin, kingdoms_end),
(store_relation, ":relation", ":faction", "$g_talk_troop_faction"),
(try_begin),
(le, ":relation", -10),
# enemies, half impact
(call_script, "script_change_player_relation_with_faction", ":faction", ":half"),
(else_try),
# not at war, full impact
(call_script, "script_change_player_relation_with_faction", ":faction", ":impact"),
(try_end),
(try_end),
# apply the honor hit
(call_script, "script_change_player_honor", ":impact"),
# party morale takes a hit as well
(call_script, "script_change_player_party_morale", ":half"),
# but give them renown for this evil deed (their deed spreads upon every tongue, impressing some, and cowing others)
(val_mul, ":impact", -1),
(call_script, "script_change_troop_renown", "trp_player" , ":impact"),
# start with the assumption that the fief should return to its faction for redistribution
(assign, ":fief_faction", "$g_talk_troop_faction"),
(try_begin),
# handle executing the King!
(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
# find best candidate to become king
(assign, ":best_troop", -1),
(assign, ":best_renown", -1),
(try_for_range, ":troop", kingdom_heroes_begin, kingdom_heroes_end),
(neg|troop_slot_eq, ":troop", slot_troop_occupation, slto_dead), #can't choose a dead hero!
(store_troop_faction, ":faction", ":troop"),
(eq, ":faction", "$g_talk_troop_faction"),
(troop_slot_eq, ":troop", slot_troop_occupation, slto_kingdom_hero), #only other heros of this faction may become the king
(troop_get_slot, ":renown", ":troop", slot_troop_renown),
(gt, ":renown", ":best_renown"),
(assign, ":best_troop", ":troop"),
(assign, ":best_renown", ":renown"),
(try_end),
(try_begin),
# check if a candidate was found
(neq, ":best_troop", -1),
# make them king
(faction_set_slot, "$g_talk_troop_faction", slot_faction_leader, ":best_troop"),
# announce it!
#TODO: generate a presentation for this! (start_presentation, "prsnt_enemy_succession"),
(str_store_troop_name, s1, ":best_troop"),
(str_store_faction_name, s2, "$g_talk_troop_faction"),
(display_message, "@{s1} is the new King of the {s2}!!!", 0xFFFF2222),
#TODO: update the game log for this event
(else_try),
# all of the lords have been eliminated - so eliminate the faction by making their last fief neutral (q.v. trigger: # Check if a faction is defeated every day)
(assign, ":fief_faction", "fac_no_faction"),
(try_end),
(try_end),
# free up the deceased's fief
(try_for_range, ":fief", centers_begin, centers_end),
(party_get_slot, ":lord", ":fief", slot_town_lord),
(eq, ":lord", "$g_talk_troop"),
(call_script, "script_give_center_to_faction", ":fief", ":fief_faction"),
(try_end),
# no longer our prisoner
(call_script, "script_remove_troop_from_prison", "$g_talk_troop"),
(remove_troops_from_prisoners, "$g_talk_troop", 1),
]
],
###################################################################################################
# End Prisoner Talk
###################################################################################################
That's what I replaced i mean in game during dialog i'm getting duplicate dialog texts.Totenkopf900 said:
Its working but for some reason i'm getting duplicate texts.Totenkopf900 said:
No I didn't i'm going to try that now,thank youTotenkopf900 said:
Mordachai said:
thank youTotenkopf900 said:
sorry to bump this but how would you get it to work for player faction?Zaitenko said:
i followed Ritter Dummbatz post and edited so i wouldnt have to wait the the three days.Totenkopf900 said:
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"),
]),
],
),