• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

[DERS] Mod'a Freelancer Eklemek

Users who are viewing this thread

fbalo1908

Master Knight
WBWF&SVC
Öncelikle bu ilk dersim. Hatalarım varsa affedin.
Module Constans:
Code:
#+FREELANCER start
freelancer_version = 13
#Floris or no Diplomacy:
freelancer_can_use_item  = "script_troop_can_use_item" 
#with Diplomacy: 
#freelancer_can_use_item = "script_dplmc_troop_can_use_item"


#Party Slots
slot_party_orig_morale = slot_party_ai_rationale
slot_freelancer_equip_start = 100 #only used for freelancer_party_backup
slot_freelancer_version     = slot_freelancer_equip_start - 2 #only used for freelancer_party_backup

#Faction Slot
slot_faction_freelancer_troop = 101 #should be unused

#Troop Slots
slot_troop_freelancer_start_xp   =  slot_troop_signup   #110 -only used for player
slot_troop_freelancer_start_date =  slot_troop_signup_2 #111 -only used for player

plyr_mission_vacation = 1
#+Freelancer end

Module Game Menus şunu bulun:
Code:
  ("notification_relieved_as_marshal", mnf_disable_all_keys,
    "{s4} wishes to inform you that your services as marshal are no longer required. In honor of valiant efforts on behalf of the realm over the last {reg4} days, however, {reg8?she:he} offers you a purse of {reg5} denars.",
    "none",
    [
	(assign, reg4, "$g_player_days_as_marshal"),
	

	
	(store_div, ":renown_gain", "$g_player_days_as_marshal",4),
	(val_min, ":renown_gain", 20),
	(store_mul, ":denar_gain", "$g_player_days_as_marshal", 50),
	(val_max, ":denar_gain", 200),
	(val_min, ":denar_gain", 4000),
	(troop_add_gold, "trp_player", ":denar_gain"),
	(call_script, "script_change_troop_renown", "trp_player", ":renown_gain"),
	(assign, "$g_player_days_as_marshal", 0),
	(assign, "$g_dont_give_marshalship_to_player_days", 15),
	(assign, reg5, ":denar_gain"),
	
	(faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader),
	(str_store_troop_name, s4, ":faction_leader"),
	(troop_get_type, reg8, ":faction_leader"),
	],
	
	 [
      ("continue",[],"Continue",
       [         
         (change_screen_return),         
       ]),         
    ]
  ),
Altına bunu ekleyin:
#+freelancer start
#menu_world_map_soldier
    ("world_map_soldier",0,
    "What do you need to do soldier?",
    "none",
    [
(set_background_mesh, "mesh_pic_soldier_world_map"),
(troop_get_slot, "$enlisted_party", "$enlisted_lord", slot_troop_leaded_party), #CABA - to refresh it? maybe not necessessary
],
[
("join_commander_battle",[
(party_get_battle_opponent, ":commander_opponent", "$enlisted_party"),
(gt, ":commander_opponent", 0),
],"Follow the commander into battle.",[
    (party_set_slot, "p_freelancer_party_backup", slot_party_last_in_combat, 1), #needed to catch post-battle and detach any attached parties

(try_begin),
(neg|troop_is_guarantee_horse, "$player_cur_troop"),
(troop_get_inventory_slot, ":horse", "trp_player", ek_horse),
(gt, ":horse", 0),
(troop_get_inventory_slot_modifier, ":horse_imod", "trp_player", ek_horse),
(set_show_messages, 0),
(troop_add_item, "trp_player", ":horse", ":horse_imod"),
(troop_set_inventory_slot, "trp_player", ek_horse, -1),
(set_show_messages, 1),
(try_end),
(start_encounter, "$enlisted_party"),
(change_screen_map),
]),

        ("enter_town",[(party_is_in_any_town,"$enlisted_party"),] ,"Enter stationed town.",
        [(party_get_cur_town, ":town_no", "$enlisted_party"),(start_encounter, ":town_no"),(change_screen_map),]),

("commander",[(party_get_battle_opponent, ":commander_opponent", "$enlisted_party"),(lt, ":commander_opponent", 0),],
  "Request audience with your commander.",
        [(jump_to_menu, "mnu_commander_aud"),]),

("revolt",[],"Revolt against the commander!",
        [(jump_to_menu, "mnu_ask_revolt"),]),

("desert",[],"Desert the army.(keep equipment but lose relations)",
        [(jump_to_menu, "mnu_ask_desert"),]),

("report",[],"Commander's Report",
[(start_presentation, "prsnt_taragoth_lords_report"),]),

("return_to_duty",[
(party_get_battle_opponent, ":commander_opponent", "$enlisted_party"),
(this_or_next|lt, ":commander_opponent", 0),
(troop_is_wounded, "trp_player"),
],"Return to duty.",
        [(change_screen_map),
(assign, "$g_infinite_camping", 1),
        (rest_for_hours_interactive, 24 * 365, 5, 1),
]),
    ]),
 
#menu_aud_with_commander
  (
    "commander_aud",0,
    "Your request for a meeting is relayed to your commander's camp, and finally {s6} appears from his tent to speak with you.",
    "none",
    [(set_background_mesh, "mesh_pic_soldier_world_map"),(str_store_troop_name, s6, "$enlisted_lord")],
    [
      ("continue",[],
      "Continue...",
      [
(try_begin),
(neg|party_is_in_any_town, "$enlisted_party"),
(start_encounter, "$enlisted_party"),
(change_screen_map),
(else_try),
#Fake that it is a party encounter when enlisted party in a town (lines taken from script_game_event_party_encounter)
(assign, "$g_encountered_party", "$enlisted_party"),
(store_faction_of_party, "$g_encountered_party_faction","$g_encountered_party"),
(store_relation, "$g_encountered_party_relation", "$g_encountered_party_faction", "fac_player_faction"),
(party_get_slot, "$g_encountered_party_type", "$g_encountered_party", slot_party_type),
(party_get_template_id,"$g_encountered_party_template","$g_encountered_party"),
(assign, "$talk_context", tc_party_encounter),
(call_script, "script_setup_party_meeting", "$g_encountered_party"),
(try_end),
        ]),
("reject_talk_lord",[],"No, nevermind.",
        [(change_screen_map),]),
    ]
  ),

    #menu_ask_revolt
    ("ask_revolt",0,
    "Are you sure you want to revolt?",
    "none",
    [(set_background_mesh, "mesh_pic_soldier_rebel"),(str_store_troop_name, s6, "$enlisted_lord")],[
("confirm_revolt",[],"Yes, {s6} will be the death of us all, it is time to act!",
        [(jump_to_menu, "mnu_revolt"),]),

("reject_revolt",[],"No, I am loyal to {s6}.",
        [(change_screen_return),]),
    ]),

    #menu_revolt
    ("revolt",0,
    "Do you want to release the prisoners to help your men?",
    "none",
    [
        (set_background_mesh, "mesh_pic_soldier_rebel"),
(assign, "$cant_leave_encounter", 1),

        #revert parties to former settings
(call_script, "script_freelancer_detach_party"),
(call_script, "script_event_player_deserts"),
#adds other troops to join player revolt
        (call_script, "script_get_desert_troops"),

        #decreases player relation to his commander and faction
        (call_script, "script_change_player_relation_with_troop", "$enlisted_lord", -10),

(store_troop_faction, ":commander_faction", "$enlisted_lord"),
        (try_begin),
            (party_get_battle_opponent, ":commander_enemy", "$enlisted_party"),
            (gt, ":commander_enemy", 0),
            (store_faction_of_party, ":eek:ther_faction", ":commander_enemy"),
            (store_relation, ":relation", ":eek:ther_faction", ":commander_faction"),
            (store_sub, ":mod_relation", 100, ":relation"),
            (val_add, ":mod_relation", 5),
            (call_script, "script_change_player_relation_with_faction_ex", ":commander_faction", ":mod_relation"),
        (try_end),
    ],
    [
        ("revolt_prisoners",[],"Yes, I will take the risk for a greater advantage.",
        [
            (party_clear, "p_temp_party_2"),
            #loop adding commander's prisoners to player party as troops
            (party_get_num_prisoner_stacks, ":num_stacks", "$enlisted_party"),
            (try_for_range, ":cur_stack", 0, ":num_stacks"),
                (party_prisoner_stack_get_troop_id , ":prisoner_troop", "$enlisted_party", ":cur_stack"),
                (ge, ":prisoner_troop", 1),
                (party_prisoner_stack_get_size, ":stack_size", "$enlisted_party", ":cur_stack"),
                (party_remove_prisoners, "$enlisted_party", ":prisoner_troop", ":stack_size"),
                (party_add_members, "p_temp_party_2", ":prisoner_troop", ":stack_size"),
            (try_end),
(party_attach_to_party, "p_temp_party_2", "p_main_party"),
            (start_encounter, "$enlisted_party"),
            (change_screen_map),
        ]),

        ("revolt_no_prisoners",[],"No, I don't trust prisoners.",
        [
(start_encounter, "$enlisted_party"),
            (change_screen_map),
        ]),

    ]),


    #menu_ask_desert
    ("ask_desert",0,
    "Do you want to desert?",
    "none",
    [(set_background_mesh, "mesh_pic_soldier_desert"),],[
        ("confirm_desert",[],"Yes, this is pointless.",
        [(jump_to_menu, "mnu_desert"),]),

        ("reject_desert",[],"No, I am loyal to my commander.",
        [(change_screen_return),]),
    ]),
 
    #menu_desert
    ("desert",0,
    "While in the army you've made some good friends. Some could possibly follow you.",
    "none",
    [
        (set_background_mesh, "mesh_pic_soldier_desert"),

(call_script, "script_freelancer_detach_party"),
(call_script, "script_event_player_deserts"),
],
    [
        ("desert_party",[],"Try to convince them to follow you.",[
            #1 in 4 chance of being caught with others
            (store_random_in_range, ":chance_caught", 0, 4),
            (try_begin),
                (eq, ":chance_caught", 0),
(assign, "$g_encountered_party", "$enlisted_party"),
        (jump_to_menu, "mnu_captivity_start_wilderness"),
            (else_try),
                (call_script, "script_get_desert_troops"),
(call_script, "script_party_restore"),
                (call_script, "script_set_parties_around_player_ignore_player", 2, 4),
            (try_end),
            (change_screen_map),(display_message, "@You have deserted, and are now wanted!"), ]),

        ("desert_alone",[],"No, I have a better chance alone.",[
            #1 in 10 chance of being caught alone
            (store_random_in_range, ":chance_caught", 0, 10),
            (try_begin),
                (eq, ":chance_caught", 0),
                (assign, "$g_encountered_party", "$enlisted_party"),
        (jump_to_menu, "mnu_captivity_start_wilderness"),
            (else_try),
    (call_script, "script_party_restore"),
                (call_script, "script_set_parties_around_player_ignore_player", 2, 4),
            (try_end),
            (change_screen_map),
(display_message, "@You have deserted, and are now wanted!"), ]),
    ]

),
 
    #menu_upgrade_path
  ("upgrade_path",0,
    "In recognition of your excellent service, you have been promoted.",
    "none",[
(set_background_mesh, "mesh_pic_soldier_world_map"),
(call_script, "script_freelancer_unequip_troop", "$player_cur_troop"),
],
    [
        ("upgrade_path_1",[
            (troop_get_upgrade_troop, ":path_1_troop", "$player_cur_troop", 0),
            (ge, ":path_1_troop", 0),
            (str_store_troop_name, s66, ":path_1_troop"),],
        "{s66}",[
            (troop_get_upgrade_troop, "$player_cur_troop", "$player_cur_troop", 0),
(store_troop_faction, ":commander_faction", "$enlisted_lord"),
(faction_set_slot, ":commander_faction", slot_faction_freelancer_troop, "$player_cur_troop"),
(call_script, "script_freelancer_equip_troop", "$player_cur_troop"),
(str_store_troop_name, s5, "$player_cur_troop"),
    (str_store_string, s5, "@Current rank: {s5}"),
            (add_quest_note_from_sreg, "qst_freelancer_enlisted", 3, s5, 1),
            (change_screen_map),]),

        ("upgrade_path_2",[
            (troop_get_upgrade_troop, ":path_2_troop", "$player_cur_troop", 1),
            (ge, ":path_2_troop", 1),
            (str_store_troop_name, s67, ":path_2_troop"),],
        "{s67}",[
            (troop_get_upgrade_troop, "$player_cur_troop", "$player_cur_troop", 1),
(store_troop_faction, ":commander_faction", "$enlisted_lord"),
(faction_set_slot, ":commander_faction", slot_faction_freelancer_troop, "$player_cur_troop"),
(call_script, "script_freelancer_equip_troop", "$player_cur_troop"),
(str_store_troop_name, s5, "$player_cur_troop"),
    (str_store_string, s5, "@Current rank: {s5}"),
            (add_quest_note_from_sreg, "qst_freelancer_enlisted", 3, s5, 1),
            (change_screen_map),]),
    ]),
#+freelancer end
Module Meshes en altına:
#+freelancer begin
  ("pic_soldier_world_map", 0, "pic_soldier_world_map", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("pic_soldier_rebel", 0, "pic_soldier_rebel", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("pic_soldier_desert", 0, "pic_soldier_desert", 0, 0, 0, 0, 0, 0, 1, 1, 1),
#+freelancer end
Mission Templates en üstüne:
Code:
# (ti_on_agent_hit, 0, 0,
	   # [],
	# [   	    (store_trigger_param_1, ":unused"), 	 
			# (store_trigger_param_2, ":agent"), #Trigger parameter 2 for this trigger is the attacker agent. Parameter 1 is the hit agent.
			# (agent_is_human, ":agent"),
			# (agent_is_alive, ":agent"),
		
		# (agent_get_wielded_item,":breakweapon",":agent",0),
		
		# (is_between,":breakweapon","itm_wooden_stick","itm_awlpike_long"), #change this to set the items you want to break				
						
		# (store_random_in_range,":weaponbreakchance",1,150),
# #--Cabadrin imod Quality Modifier
	   # (agent_get_troop_id, ":troop_id", ":agent"),
	   # (try_begin),    #only heroes have item modifications
		   # (troop_is_hero, ":troop_id"),
		   # (try_for_range, ":item_slot", ek_item_0, ek_head),    # heroes have only 4 possible weapons (equipped)
			   # (troop_get_inventory_slot, reg8, ":troop_id", ":item_slot"),  #Find Item Slot with same item ID as Equipped Weapon
			   # (eq, reg8, ":breakweapon"),
			   # (troop_get_inventory_slot_modifier, ":imod", ":troop_id", ":item_slot"),
		   # (try_end),
	   # (else_try),
		   # (assign, ":imod", imodbit_plain),
	   # (try_end),
# #Better than Average
# #I know i'm totally wrong with most of them, just go on and edit the values as you want 
	   # (try_begin),
		   # (eq, imodbit_masterwork, ":imod"),
		   # (val_min,":weaponbreakchance",9),#1%
	   # (else_try),
		   # (eq, imodbit_tempered, ":imod"),
		   # (val_min,":weaponbreakchance",8),#2%
	   # (else_try),
		   # (eq, imodbit_balanced, ":imod"),
		   # (val_add,":weaponbreakchance",3),
	   # (else_try),
		   # (eq, imodbit_heavy, ":imod"),
		   # (val_add,":weaponbreakchance",2),
	   # (else_try),
		   # (eq, imodbit_plain, ":imod"),
		   # (val_add,":weaponbreakchance",1),
   # #Worse than Average
	   # (else_try),
		   # (eq, imodbit_bent, ":imod"),
		   # (val_add,":weaponbreakchance",4),
	   # (else_try),
		   # (eq, imodbit_rusty, ":imod"),
		   # (val_add,":weaponbreakchance",7),
	   # (else_try),
		   # (eq, imodbit_chipped, ":imod"),
		   # (val_add,":weaponbreakchance",8),
	   # (else_try),
		   # (eq, imodbit_cracked, ":imod"),
		   # (val_add,":weaponbreakchance",15),
	   # (try_end),
	# #--End imod Quality Modifier
			   # (try_begin),   
			# (ge,":weaponbreakchance",140),
			# (agent_unequip_item,":agent",":breakweapon"),
			# (str_store_item_name, s0, ":breakweapon"),
			# (try_begin),
				# (get_player_agent_no, ":player_agent"),
				# (eq, ":agent", ":player_agent"),
				# (troop_remove_item, "trp_player", ":breakweapon"),
				# (display_message, "@You broke your {s0}.",0xFF0000),
				# (else_try),
				   # #(agent_get_troop_id, ":troop", ":agent"),
				# (str_store_troop_name,s1,":troop_id"),
				# (display_message, "@{s1} broke his {s0}.",0x66FF33),
					# (agent_set_animation, ":agent", "anim_strike_chest_front"),
				# (assign, ":weapon_broke", 1),
							# (else_try),
								# (agent_get_horse,":horse",":agent"),
				   # #(agent_get_troop_id, ":troop", ":agent"),
								# (str_store_troop_name,s1,":troop_id"),
				# (display_message, "@{s1} broke his {s0}.",0x66FF33),
					# (agent_set_animation, ":agent", "anim_strike_chest_front"),#You need to replace this animation with the horseman's strike
				# (assign, ":weapon_broke", 1),
			# (try_end),
		# (try_end),  
	# ]),

 # (ti_on_agent_killed_or_wounded, 0, 0, [(store_trigger_param_2, ":killer_agent_no"),(eq, ":killer_agent_no", "$fplayer_agent_no")],
   # [
	# (store_trigger_param_1, ":dead_agent_no"),
	# (neg|agent_is_ally, ":dead_agent_no"),
	# (agent_is_human, ":dead_agent_no"),	
    # (val_add, "$killcount", 1),
   # ]),
	
# END OF FREELANCER TRIGGERS
Module Parties:
Code:
 ("freelancer_party_backup","{!}",  pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]),
Presentations:
Code:
# __Freelancer Report: Commander_:Start_________________________________________________

  ("taragoth_lords_report", 0, mesh_load_window, [

	(ti_on_presentation_load,
	[
		(presentation_set_duration, 999999),
		(set_fixed_point_multiplier, 1000),

		#title
		(create_text_overlay, reg0, "@CURRENT COMMANDER'S REPORT!", tf_left_align),
		(position_set_x, pos1, 50),
		(position_set_y, pos1, 650),
		(overlay_set_position, reg0, pos1),
		(position_set_x, pos1, 1500),
		(position_set_y, pos1, 1500),
		(overlay_set_size, reg0, pos1),
		
		#Player Name
		#(create_text_overlay, reg0, "@'{playername}'", tf_center_justify),
		#(position_set_x, pos1, 500),
		#(position_set_y, pos1, 615),
		#(overlay_set_position, reg0, pos1),

		(assign, ":cur_y_adder", 40),  #the amount of space between lines
		(assign, ":cur_y", 580),
		(position_set_x, pos1, 50),		
		
		#Commander_name
		(str_store_troop_name, s19, "$enlisted_lord"),
		(create_text_overlay, reg0, "@Your Commander: {s19}", tf_left_align),	
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#Player_Relation
		(call_script, "script_troop_get_player_relation", "$enlisted_lord"),
		#(assign, ":commander_relation", reg0),
		(create_text_overlay, reg0, "@Commander Relation: {reg0}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#Faction_name
		(store_faction_of_troop, reg1, "$enlisted_lord"),
		(str_store_faction_name, s20, reg1),
		(create_text_overlay, reg0, "@Enlisted Faction: {s20}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#Rank_name
		(str_store_troop_name, s21, "$player_cur_troop"),
		(create_text_overlay, reg0, "@Current Rank: {s21}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),
		
		#xp-to-next promotion
		(troop_get_slot, ":service_xp_start", "trp_player", slot_troop_freelancer_start_xp),
        (troop_get_xp, ":service_xp_cur", "trp_player"),
        (val_sub, ":service_xp_cur", ":service_xp_start"),
		(troop_get_upgrade_troop, ":upgrade_troop", "$player_cur_troop", 0),
		(str_store_string, s1, "@N/A"),
		(try_begin),
			(gt, ":upgrade_troop", 1), #make sure troop is valid and not player troop
			(call_script, "script_game_get_upgrade_xp", "$player_cur_troop"),
			(store_sub, reg0, reg0, ":service_xp_cur"), #required XP from script
			(gt, reg0, 0),
			(str_store_string, s1, "str_reg0"),
		(try_end),
		(create_text_overlay, reg0, "@Experience to next promotion: {s1}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#enlisted_time
		(store_current_day, ":cur_day"),
		(troop_get_slot, ":service_day_start", "trp_player", slot_troop_freelancer_start_date),
		(store_sub, ":service_length", ":cur_day", ":service_day_start"),
		(assign, reg20, ":service_length"),
		(create_text_overlay, reg0, "@Days in service: {reg20}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#current_wage
		(store_character_level, ":level", "$player_cur_troop"),
		#pays player 10 times the troop level
		(store_mul, ":weekly_pay", 10, ":level"),
		(assign, reg23, ":weekly_pay"),
		(create_text_overlay, reg0, "@Current Wage: {reg23} denars.", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),
		
		#next_pay
		(str_store_date, s25, "$g_next_pay_time"),
		(create_text_overlay, reg0, "@Next Pay/Promotion day: {s25}", tf_left_align),
		(position_set_y, pos1, ":cur_y"),
		(overlay_set_position, reg0, pos1),
		(val_sub, ":cur_y", ":cur_y_adder"),

		#Commanders_troops size(right side)
		(store_party_size_wo_prisoners,":army_size","$enlisted_party"), 
		(assign, reg26, ":army_size"),
		(create_text_overlay, reg0, "@Army size: {reg26}", tf_left_align),
		(position_set_x, pos1, 800),
		(position_set_y, pos1, 60),
		(overlay_set_position, reg0, pos1),
		(position_set_x, pos1, 900),
        (position_set_y, pos1, 900),
        (overlay_set_size, reg0, pos1),

		#commanders_army_title
		(create_text_overlay, reg0, "@Commander's Army", tf_left_align),
		(position_set_x, pos1, 500),
		(position_set_y, pos1, 430),
		(overlay_set_position, reg0, pos1),

        #camp  pic		
		(create_mesh_overlay, reg0, "mesh_pic_camp"),
		(position_set_x, pos1, 450),
		(position_set_y, pos1, 380),
		(overlay_set_position, reg0, pos1),
		(position_set_x, pos1, 500),
		(position_set_y, pos1, 500),
		(overlay_set_size, reg0, pos1),	
		 #Faction arms(try_end),
		 
		(store_faction_of_troop, ":cmdr_faction", "$enlisted_lord"),
		(try_begin),
			(eq, ":cmdr_faction","fac_kingdom_1"),
			(create_mesh_overlay, reg0, "mesh_pic_arms_swadian"),
		(else_try),
			(eq, ":cmdr_faction","fac_kingdom_2"),
			(create_mesh_overlay, reg0, "mesh_pic_arms_vaegir"),
		(else_try),
			(eq, ":cmdr_faction","fac_kingdom_3"),
			(create_mesh_overlay, reg0, "mesh_pic_arms_khergit"),
		(else_try),
			(eq, ":cmdr_faction","fac_kingdom_4"),
			(create_mesh_overlay, reg0, "mesh_pic_arms_nord"),
		(else_try),
			(eq, ":cmdr_faction","fac_kingdom_5"),
			(create_mesh_overlay, reg0, "mesh_pic_arms_rhodok"),
		(else_try),
			(eq, ":cmdr_faction","fac_kingdom_6"),
			(create_mesh_overlay, reg0, "mesh_pic_sarranid_arms"),
		(try_end),

		(position_set_x, pos1, 180),
		(position_set_y, pos1, 80),
		(overlay_set_position, reg0, pos1),
		(position_set_x, pos1, 600),
		(position_set_y, pos1, 600),
		(overlay_set_size, reg0, pos1),

        (str_clear, s0),
        (create_text_overlay, "$g_presentation_obj_bugdet_report_container", s0, tf_scrollable_style_2),
        (position_set_x, pos1, 560),
        (position_set_y, pos1, 100),
        (overlay_set_position, "$g_presentation_obj_bugdet_report_container", pos1),
        (position_set_x, pos1, 400),
        (position_set_y, pos1, 300), 
        (overlay_set_area_size, "$g_presentation_obj_bugdet_report_container", pos1),
        (set_container_overlay, "$g_presentation_obj_bugdet_report_container"), #all of this above here puts the list of troops in a scrollable box

        (assign, ":cur_y_adder", 40),  #the amount of space between lines
        (party_get_num_companion_stacks, ":num_of_stacks", "$enlisted_party"),
        (store_mul, ":cur_y", ":num_of_stacks", ":cur_y_adder"),
  
		(try_for_range, ":i", 1, ":num_of_stacks"), #1, to skip the commander
			(party_stack_get_troop_id, ":troop_id", "$enlisted_party", ":i"),
			(party_stack_get_size, ":stack_size", "$enlisted_party", ":i"),
			(party_stack_get_num_wounded, ":stack_wounded", "$enlisted_party", ":i"),
			(val_sub, ":stack_size", ":stack_wounded"),
						
			(str_store_troop_name, s1, ":troop_id"),
			(create_text_overlay, reg0, s1),
			(position_set_x, pos1, 25),
			(position_set_y, pos1, ":cur_y"),
			(overlay_set_position, reg0, pos1),
			(position_set_x, pos1, 900),
			(position_set_y, pos1, 900),
			(overlay_set_size, reg0, pos1),
			
			
			(assign, reg0, ":stack_size"),
			(create_text_overlay, reg0, "str_reg0"),
			(position_set_x, pos1, 325),
			(position_set_y, pos1, ":cur_y"),
			(overlay_set_position, reg0, pos1),
			(position_set_x, pos1, 900),
            (position_set_y, pos1, 900),
            (overlay_set_size, reg0, pos1),

			
			(val_sub, ":cur_y", ":cur_y_adder"),
		(try_end), #End Stack/Troop Loop

		(set_container_overlay, -1), #end the box so you can keep putting other things elsewhere
    
		#done button
		(create_game_button_overlay, "$g_presentation_obj_custom_battle_designer_19", "@Done", tf_center_justify),
		(position_set_x, pos1, 500),
		(position_set_y, pos1, 25),
		(overlay_set_position, "$g_presentation_obj_custom_battle_designer_19", pos1),

	]),
	(ti_on_presentation_event_state_change,
	[
		(store_trigger_param_1, ":object"),
		(try_begin),
			(eq, ":object", "$g_presentation_obj_custom_battle_designer_19"),
			(presentation_set_duration, 0),
		(try_end),
	]),
   ]),

# _____________________________________________________________________________END______
Quests:
Code:
  ("freelancer_enlisted", "Enlisted in the Party of {s13}", 0,
   "{!}You are currently enlisted in the party of {s13} of {s14}."),
  ("freelancer_vacation", "Enlisted: On Leave", 0,
   "{!}You have been granted leave from the party of {s13} of {s14}."),
  ("freelancer_captured", "Enlisted: Captured", 0,
   "{!}Your commander's party has been defeated and you have been captured. Return to the service of {s13} of {s14}."),

simple_triggers:
Code:
#+freelancer start
  #  WEEKLY PAY AND CHECKS FOR UPGRADE

    (24 * 7, [
        (eq, "$freelancer_state", 1),
		(troop_get_slot, ":service_xp_start", "trp_player", slot_troop_freelancer_start_xp),
        (troop_get_xp, ":player_xp_cur", "trp_player"),
        (store_sub, ":service_xp_cur", ":player_xp_cur", ":service_xp_start"),

        #ranks for pay levels and to upgrade player equipment based on upgrade troop level times 1000
        # (try_begin),
           # (troop_get_upgrade_troop, ":upgrade_troop", "$player_cur_troop", 0),
           # (gt, ":upgrade_troop", 1), #make sure troop is valid and not player troop
           # (store_character_level, ":level", ":upgrade_troop"),
           # (store_pow, ":required_xp", ":level", 2), #square the level and
           # (val_mul, ":required_xp", 100),           #multiply by 100 to get xp
           # (ge, ":service_xp_cur", ":level"),
           # (jump_to_menu, "mnu_upgrade_path"),
        # (try_end),
		(try_begin),
           (troop_get_upgrade_troop, ":upgrade_troop", "$player_cur_troop", 0),
           (gt, ":upgrade_troop", 1), #make sure troop is valid and not player troop
           
		   (call_script, "script_game_get_upgrade_xp", "$player_cur_troop"),
		   (assign, ":required_xp", reg0),		   
		   ##THIS  BLOCK IS ALMOST DEFINITELY BE BETTER than the above two lines which could be commented out in exchange for them.
		   # (store_character_level, ":cur_level", "$player_cur_troop"),
           # (val_sub, ":cur_level", 1),
           # (get_level_boundary, ":cur_level", ":cur_level"),
		   # (store_character_level, ":required_xp", ":upgrade_troop"),
		   # (val_sub, ":required_xp", 1),
		   # (get_level_boundary, ":required_xp", ":required_xp"),
		   # (val_sub, ":required_xp", ":cur_level"),		   
		   ##
		   		   
           (ge, ":service_xp_cur", ":required_xp"),
		   (try_begin),
		   		(call_script, "script_cf_freelancer_player_can_upgrade", ":upgrade_troop"),
				(troop_set_slot, "trp_player", slot_troop_freelancer_start_xp, ":player_xp_cur"),
				(jump_to_menu, "mnu_upgrade_path"),
		   (else_try),
				(assign, ":reason", reg0), #from cf_freelancer_player_can_upgrade
				(try_begin),
					(eq, ":reason", 0), #not enough strength, for melee weapons
					(display_message, "@You are not strong enough to lift a weapon fit for your promotion!"),
				(else_try),
					(eq, ":reason", 1), #not enough strength, for armor
					(display_message, "@You are not strong enough to hold all that weight required with promotion!."),
				(else_try),
					(eq, ":reason", 2), #not enough power draw/throw/strength for bow/crossbow/throwing
					(display_message, "@Your arms are to weak to advance in the artillary at this moment."),
				(else_try),
					(eq, ":reason", 3), #not enough riding skill for horse
					(display_message, "@You require more horse riding skills to fit your next poisition!"),
				(try_end),				
		   (try_end),			
        (try_end),
		
		
		
        (store_character_level, ":level", "$player_cur_troop"),
        #pays player 10 times the troop level
        (store_mul, ":weekly_pay", 10, ":level"),
        (troop_add_gold, "trp_player", ":weekly_pay"),
        (add_xp_to_troop, 70, "trp_player"),
        (play_sound, "snd_money_received", 0),
    ]),

#  HOURLY CHECKS

    (1,[
        (eq, "$freelancer_state", 1),
        #so that sight and camera follows near commander's party
        (set_camera_follow_party, "$enlisted_party"),
        (party_relocate_near_party, "p_main_party", "$enlisted_party", 1), 

        (assign, ":num_food", 0),
        (troop_get_inventory_capacity, ":max_inv_slot", "trp_player"),
        (try_for_range, ":cur_inv_slot", ek_item_0, ":max_inv_slot"),
           (troop_get_inventory_slot, ":cur_item", "trp_player", ":cur_inv_slot"),
           (ge, ":cur_item", 0),
           (is_between, ":cur_item", food_begin, food_end),
           (val_add, ":num_food", 1),
        (try_end),
        (try_begin),
           (lt, ":num_food", 2),
           (troop_add_item, "trp_player", "itm_trade_bread"),
        (try_end),
    ]),
	
  #+freelancer end 
module_triggers:
Code:
#+freelancer start

#  CHECKS IF "$enlisted_party" IS DEFEATED

    (0.0, 0, 0, [
        (eq, "$freelancer_state", 1),
        (gt, "$enlisted_party", 0),
        (neg|party_is_active, "$enlisted_party"),
    ],
    [
        (assign, "$freelancer_state", 0),
        (call_script, "script_freelancer_detach_party"),
		
		#to prevent companions from being lost forever
		(call_script, "script_party_restore"), 
		(party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
        (try_for_range_backwards, ":cur_stack", 0, ":num_stacks"),
			(party_stack_get_troop_id, ":return_troop", "p_main_party", ":cur_stack"),
			(neg|troop_is_hero, ":return_troop"),
			(party_stack_get_size, ":stack_size", "p_main_party", ":cur_stack"),
			(party_remove_members, "p_main_party", ":return_troop", ":stack_size"),
		(try_end),

        #removes faction relation given at enlist
		(store_troop_faction, ":commander_faction", "$enlisted_lord"),
        (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end),
            (neq, ":commander_faction", ":cur_faction"),
			(faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active),
            (call_script, "script_set_player_relation_with_faction", ":cur_faction", 0),
        (try_end),

		(assign, "$g_encountered_party", "$g_enemy_party"),
		(jump_to_menu, "mnu_captivity_start_wilderness"),
    ]),

 #  CHECKS IF "$enlisted_party" HAS JOINED BATTLE

    (0.0, 0, 0, [
        (eq, "$freelancer_state", 1),
		
		#collected nearby enemies->detach (post-battle)
		(try_begin), 
			(party_slot_ge, "p_freelancer_party_backup", slot_party_last_in_combat, 1),
			(map_free),
			(party_set_slot, "p_freelancer_party_backup", slot_party_last_in_combat, 0),
			(party_get_num_attached_parties, ":num_attached", "p_main_party"),
			(try_for_range_backwards, ":i", 0, ":num_attached"),
				(party_get_attached_party_with_rank, ":party", "p_main_party", ":i"),
				(party_detach, ":party"),
			(try_end),
		(try_end),
		
		#Is currently in battle
        (party_get_battle_opponent, ":commander_enemy", "$enlisted_party"),
        (gt, ":commander_enemy", 0),
		
		#checks that the player's health is high enough to join battle
        (store_troop_health, ":player_health", "trp_player"),
        (ge, ":player_health", 50),
    ],
    [
        (jump_to_menu, "mnu_world_map_soldier"),
    ]),

#  CHECKS IF PLAYER WON THE REVOLT

    (1.0, 0, 0, [
        (eq, "$freelancer_state", 0),
        (gt, "$enlisted_party", 0),
        (neg|party_is_active, "$enlisted_party"),

		(store_troop_faction, ":commander_faction", "$enlisted_lord"),
        (store_relation, ":relation", "fac_player_supporters_faction", ":commander_faction"),
        (lt, ":relation", 0),

        (party_get_attached_party_with_rank, ":attached_party", "p_main_party", 0),
        (eq, "p_temp_party_2", ":attached_party"),
    ],
    [
        (assign, "$enlisted_party", -1),
        (party_detach, "p_temp_party_2"),
        (store_skill_level, ":cur_leadership", "skl_leadership", "trp_player"),
        (store_skill_level, ":cur_persuasion", "skl_persuasion", "trp_player"),
        (store_add, ":chance", ":cur_persuasion", ":cur_leadership"),
        (val_add, ":chance", 10),
        (store_random_in_range, ":prisoner_state", 0, ":chance"),

        (try_begin),
            (is_between, ":prisoner_state", 0, 5),
            (call_script, "script_party_calculate_strength", "p_main_party", 0),
            (assign, ":main_strength", reg0),
            (call_script, "script_party_calculate_strength", "p_temp_party_2", 0),
            (assign, ":temp_strength", reg0),
            (ge, ":temp_strength", ":main_strength"),

            (party_get_num_prisoner_stacks, ":num_stacks", "p_temp_party_2"),
            (try_for_range, ":cur_stack", 0, ":num_stacks"),
                (party_prisoner_stack_get_troop_id, ":cur_troops", "p_temp_party_2", ":cur_stack"),
                (party_prisoner_stack_get_size, ":cur_size", "p_temp_party_2", ":cur_stack"),
                (party_remove_prisoners, "p_temp_party_2", ":cur_troops", ":cur_size"),
            (try_end),

            (tutorial_box, "@The released prisoners were not be trusted and they are preparing to attack you!", "@Warning!"),
            (start_encounter, "p_temp_party_2"),
            (change_screen_map),
        (else_try),
            (is_between, ":prisoner_state", 5, 10),
            (tutorial_box, "@The released prisoners scattered as soon as the battle finished. You will not be seeing them again.", "@Notice!"),
            (party_clear, "p_temp_party_2"),
        (else_try),
            (tutorial_box, "@The released prisoners have remained loyal and will join your party", "@Notice!"),
            (party_get_num_companion_stacks, ":num_stacks", "p_temp_party_2"),
            (try_for_range, ":cur_stack", 0, ":num_stacks"),
                (party_stack_get_troop_id, ":cur_troops", "p_temp_party_2", ":cur_stack"),
                (party_stack_get_size, ":cur_size", "p_temp_party_2", ":cur_stack"),
                (party_add_members, "p_main_party", ":cur_troops", ":cur_size"),
            (try_end),
            (party_clear, "p_temp_party_2"),
        (try_end),
    ]),

# IF LEFT MOUSE CLICK GO TO SOLDIER'S MENU

    (0.0, 0, 0, [
        (eq, "$freelancer_state", 1),
        (key_clicked, key_left_mouse_button),

        (set_fixed_point_multiplier, 1000),
        (mouse_get_position, pos0),
        (position_get_y, ":y", pos0),
        (gt, ":y", 50), #allows the camp, reports, quests, etc. buttons to be clicked
    ],
    [
        (jump_to_menu, "mnu_world_map_soldier"),
        (rest_for_hours_interactive, 9999, 4, 0),
    ]),

(24.0, 0, 0, [
        (eq, "$freelancer_state", 2),
    ],
    [
		(troop_get_slot, ":days_left", "trp_player", slot_troop_days_on_mission),
		(try_begin),
		  (gt, ":days_left", 5),
		  (val_sub, ":days_left", 1),
		  (troop_set_slot, "trp_player", slot_troop_days_on_mission, ":days_left"),
		(else_try),		  
		  (is_between, ":days_left", 1, 5),
		  (assign, reg0, ":days_left"),
		  (display_message, "@You have {reg0} days left till you are declared as a deserter!"),
		  (val_sub, ":days_left", 1),
		  (troop_set_slot, "trp_player", slot_troop_days_on_mission, ":days_left"),
		(else_try), #declare deserter
		  (eq, ":days_left", 0),
		  (call_script, "script_event_player_deserts"),
          (display_message, "@You have now been declared as a deserter!"),
		(try_end),  
    ]),


#+freelancer end

Hatam olduysa affedin. Bunu yapınca build_module'de bir sürü warning çıkıyor. Bunları düzeltemedim ama oyun içinde sorun yok. Herkese iyi oyunlar. Umarım faydalı olmuştur.:smile: Devamını yorum olarak yazacağım. Karakter yetmedi :grin:
 

fbalo1908

Master Knight
WBWF&SVC
module_scripts:
Code:
#+freelancer start
   ("freelancer_attach_party",
    [
	    #prepare player to be part of lord's party
        (party_attach_to_party, "p_main_party", "$enlisted_party"),
        (set_camera_follow_party, "$enlisted_party"),
        (party_set_flags, "$enlisted_party", pf_always_visible, 1),
        (disable_party, "p_main_party"),

		#initialize service variable
		(assign, "$freelancer_state", 1),		
    ]),

   ("freelancer_detach_party",
    [
	    #removes player from commanders party
		(enable_party, "p_main_party"),
        (party_detach, "p_main_party"),
		
		(try_begin),
			(party_is_active, "$enlisted_party"),
			(party_relocate_near_party, "p_main_party", "$enlisted_party", 2),
			(party_set_flags, "$enlisted_party", pf_always_visible, 0),
		(try_end),	
		
	    (set_camera_follow_party, "p_main_party"),
		(assign, "$g_player_icon_state", pis_normal),
	]),

# ADDS THE PLAYER TO THE LORD'S PARTY  
    ("event_player_enlists",
    [
	    #initialize service variables
        (troop_get_xp, ":xp", "trp_player"),
		(troop_set_slot, "trp_player", slot_troop_freelancer_start_xp, ":xp"),
        (store_current_day, ":day"), 
        (troop_set_slot, "trp_player", slot_troop_freelancer_start_date, ":day"),		
		(party_get_morale, ":morale", "p_main_party"),
		(party_set_slot, "p_main_party", slot_party_orig_morale, ":morale"),
        #(assign, "$freelancer_state", 1), #moved to script
	
        #needed to stop bug where parties attack the old player party
        (call_script, "script_set_parties_around_player_ignore_player", 2, 4),
        #set lord as your commander
		(assign, "$enlisted_lord", "$g_talk_troop"),
		(troop_get_slot, "$enlisted_party", "$enlisted_lord", slot_troop_leaded_party), 
        #removes troops from player party
        (party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
        (try_for_range_backwards, ":cur_stack", 1, ":num_stacks"), #lower bound is 1 to ignore player character
           (party_stack_get_troop_id, ":cur_troops", "p_main_party", ":cur_stack"),
           (party_stack_get_size, ":cur_size", "p_main_party", ":cur_stack"),
           (party_remove_members, "p_main_party", ":cur_troops", ":cur_size"),
        (try_end),
        
		#set faction relations to allow player to join battles
        (store_troop_faction, ":commander_faction", "$enlisted_lord"),
		(try_begin),
			(store_relation, ":player_relation", ":commander_faction", "fac_player_supporters_faction"),
			(lt, ":player_relation", 5),
			(call_script, "script_set_player_relation_with_faction", ":commander_faction", 5),
		(try_end),
        (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end),
           (neq, ":commander_faction", ":cur_faction"),
		   (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active),
		   (store_relation, ":player_relation", ":cur_faction", "fac_player_supporters_faction"),
		   (ge, ":player_relation", 0),
           (call_script, "script_set_player_relation_with_faction", ":cur_faction", -5),
        (try_end),		

        #adds standard issued equipment
		(try_begin),
			(neg|faction_slot_eq, ":commander_faction", slot_faction_freelancer_troop, 0),
			(faction_get_slot, "$player_cur_troop", ":commander_faction", slot_faction_freelancer_troop),
		(else_try),
			(faction_get_slot, "$player_cur_troop", ":commander_faction", slot_faction_tier_1_troop),
		(try_end),		
		(call_script, "script_freelancer_equip_troop", "$player_cur_troop"),

		(call_script, "script_freelancer_attach_party"),
		#makes Lords banner the players
		(troop_get_slot, ":banner", "$enlisted_lord", slot_troop_banner_scene_prop),
		(troop_set_slot, "trp_player", slot_troop_banner_scene_prop, ":banner"),
        (display_message, "@You have been enlisted!"),	

		
        (str_store_troop_name_link, s13, "$enlisted_lord"),
		(str_store_faction_name_link, s14, ":commander_faction"),
		(quest_set_slot, "qst_freelancer_enlisted", slot_quest_target_party, "$enlisted_party"),
		(quest_set_slot, "qst_freelancer_enlisted", slot_quest_importance, 5),
		(quest_set_slot, "qst_freelancer_enlisted", slot_quest_xp_reward, 1000),
		(quest_set_slot, "qst_freelancer_enlisted", slot_quest_gold_reward, 100),
		(setup_quest_text, "qst_freelancer_enlisted"),
		(str_clear, s2), #description. necessary?
        (call_script, "script_start_quest", "qst_freelancer_enlisted", "$enlisted_lord"),
		(str_store_troop_name, s5, "$player_cur_troop"),
		(str_store_string, s5, "@Current rank: {s5}"),
        (add_quest_note_from_sreg, "qst_freelancer_enlisted", 3, s5, 1),		
    ]),

#  RUNS IF THE PLAYER LEAVES THE ARMY

   ("event_player_discharge",
    [
		#removes faction relation given at enlist
		(store_troop_faction, ":commander_faction", "$enlisted_lord"),
		(call_script, "script_change_player_relation_with_faction_ex", ":commander_faction", 5),
		(try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end),
            (neq, ":commander_faction", ":cur_faction"),
			(faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active),
			(store_relation, ":player_relation", ":cur_faction", "fac_player_supporters_faction"),
			(lt, ":player_relation", 0),
            (call_script, "script_set_player_relation_with_faction", ":cur_faction", 0),
        (try_end),
		# removes standard issued equipment
		# (try_for_range, ":cur_inv_slot", ek_item_0, ek_food),
			# (troop_get_inventory_slot, ":soldier_equipment", "$player_cur_troop", ":cur_inv_slot"),
			# (ge, ":soldier_equipment", 0),
			# (troop_remove_item, "trp_player", ":soldier_equipment"),
		# (try_end),
		(call_script, "script_freelancer_unequip_troop", "$player_cur_troop"),		
		(troop_equip_items, "trp_player"),
		

		(troop_set_slot, "trp_player", slot_troop_current_mission, 0),
		(troop_set_slot, "trp_player", slot_troop_days_on_mission, 0),
		(troop_set_slot, "trp_player", slot_troop_banner_scene_prop, 0),
		(assign, "$freelancer_state", 0),
		(call_script, "script_freelancer_detach_party"),
		(rest_for_hours, 0,0,0),
		(display_message, "@You have left your commander!"), 

        #(call_script, "script_cancel_quest", "qst_freelancer_enlisted"),
		(call_script, "script_finish_quest", "qst_freelancer_enlisted", 100), #percentage--make based on days served?
    ]),
	
#  RUNS IF THE PLAYER GOES ON VACATION

    ("event_player_vacation",
    [
	    (troop_set_slot, "trp_player", slot_troop_current_mission, plyr_mission_vacation), ###move to quests, not missions
		(troop_set_slot, "trp_player", slot_troop_days_on_mission, 14),
	
		#removes faction relation given at enlist
		(store_troop_faction, ":commander_faction", "$enlisted_lord"),
		(try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end),
            (neq, ":commander_faction", ":cur_faction"),
			(faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active),
            (call_script, "script_set_player_relation_with_faction", ":cur_faction", 0),
        (try_end),

		(assign, "$freelancer_state", 2),
		(call_script, "script_freelancer_detach_party"),
		(rest_for_hours, 0,0,0),
		(display_message, "@You have been granted leave!"), 	

		(str_store_troop_name_link, s13, "$enlisted_lord"),
		(str_store_faction_name_link, s14, ":commander_faction"),
		(quest_set_slot, "qst_freelancer_vacation", slot_quest_target_party, "$enlisted_party"),
		(quest_set_slot, "qst_freelancer_vacation", slot_quest_importance, 0),
		(quest_set_slot, "qst_freelancer_vacation", slot_quest_xp_reward, 50),
		(quest_set_slot, "qst_freelancer_vacation",	slot_quest_expiration_days, 14),
		(setup_quest_text, "qst_freelancer_vacation"),
		(str_clear, s2), #description. necessary?
        (call_script, "script_start_quest", "qst_freelancer_vacation", "$enlisted_lord"),
    ]),

# RUNS WHEN PLAYER RETURNS FROM VACATION

  ("event_player_returns_vacation",
    [
        (troop_set_slot, "trp_player", slot_troop_current_mission, 0),
		(troop_set_slot, "trp_player", slot_troop_days_on_mission, 0),
		
		#needed to stop bug where parties attack the old player party
        (call_script, "script_set_parties_around_player_ignore_player", 2, 4),

        #removes troops from player party #Caba--could use party_clear? and then add the player back?
        (party_get_num_companion_stacks, ":num_stacks", "p_main_party"),
        (try_for_range_backwards, ":cur_stack", 1, ":num_stacks"), #lower bound is 1 to ignore player character
           (party_stack_get_troop_id, ":cur_troops", "p_main_party", ":cur_stack"),
           (party_stack_get_size, ":cur_size", "p_main_party", ":cur_stack"),
           (party_remove_members, "p_main_party", ":cur_troops", ":cur_size"),
        (try_end),
		
        #To fix any errors of the lord changing parties
		(troop_get_slot, "$enlisted_party", "$enlisted_lord", slot_troop_leaded_party), 
		
		#set faction relations to allow player to join battles
		(store_troop_faction, ":commander_faction", "$enlisted_lord"),
		(try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end),
           (neq, ":commander_faction", ":cur_faction"),
		   (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active),
           (call_script, "script_set_player_relation_with_faction", ":cur_faction", -5),
        (try_end),	
		(try_begin),
			(store_relation, ":player_relation", ":commander_faction", "fac_player_supporters_faction"),
			(lt, ":player_relation", 5),
			(call_script, "script_set_player_relation_with_faction", ":commander_faction", 5),
		(try_end),

		(call_script, "script_freelancer_attach_party"),
		(display_message, "@You have rejoined your commander!"), 		
    ]),
	
	
  # RUNS IF PLAYER DESERTS OR IS AWOL
  ("event_player_deserts",
   [     
   	(store_troop_faction, ":commander_faction", "$enlisted_lord"),
	(call_script, "script_change_player_relation_with_faction_ex", ":commander_faction", -10), 
    (call_script, "script_change_player_relation_with_troop", "$enlisted_lord", -10),
    (call_script, "script_change_player_honor", -20),
	
	(troop_set_slot, "trp_player", slot_troop_current_mission, 0),
	(troop_set_slot, "trp_player", slot_troop_days_on_mission, 0),
	(faction_set_slot, ":commander_faction", slot_faction_freelancer_troop, 0),
	(troop_set_slot, "trp_player", slot_troop_banner_scene_prop, 0),
	(rest_for_hours, 0,0,0),
	(assign, "$freelancer_state", 0),
	#(display_message, "@You have deserted your commander!"), #Taken care of elsewhere
	(call_script, "script_fail_quest", "qst_freelancer_enlisted"),
   ]),	
	
	
	# RETURNS PART OF THE ORIGINAL PARTY
    ("party_restore", 
    [
        (store_current_day, ":cur_day"),
        #formula for soldier desertion chance
		(troop_get_slot, ":service_day_start", "trp_player", slot_troop_freelancer_start_date),
        (store_sub, ":service_length", ":cur_day", ":service_day_start"), #gets number of days served
		(party_get_slot, ":morale", "p_main_party", slot_party_orig_morale),
        (store_add, ":return_chance", 800, ":morale"), #up to 100
        (val_sub, ":return_chance", ":service_length"), #up to far over 100

        #loop that looks at each troop stack in a party, 
        #then decides if troops of that stack will return, 
        #and randomly assigns a number of troops in that stack to return
        (party_get_num_companion_stacks, ":num_stacks", "p_freelancer_party_backup"),
        (try_for_range, ":cur_stack", 0, ":num_stacks"),
			(assign, ":stack_amount", 0),
			(party_stack_get_troop_id, ":return_troop", "p_freelancer_party_backup", ":cur_stack"),
			(neq, ":return_troop", "trp_player"),
			(try_begin),
				(troop_is_hero, ":return_troop"), #bugfix for companions (simple, they always return)
				(assign, ":stack_amount", 1),
			(else_try),
				#limit may need changed for more accurate probability
				(store_random_in_range, ":return_random", 0, 1000),
				(is_between, ":return_random", 0, ":return_chance"),
				(party_stack_get_size, ":stack_size", "p_freelancer_party_backup", ":cur_stack"),
				#checks what chance there is that all troops in stack will return
				(store_random_in_range, ":return_random", 0, 1000),
				(try_begin),
					(is_between, ":return_random", 0, ":return_chance"),
					(assign, ":stack_amount", ":stack_size"),
				(else_try),
					#else random number of troops return
					(store_random_in_range, ":stack_amount", 0, ":stack_size"),
				(try_end),
			(try_end),
			(ge, ":stack_amount", 1),
			(party_add_members, "p_main_party", ":return_troop", ":stack_amount"),
        (try_end),
		(party_clear, "p_freelancer_party_backup"),
    ]),

#  CALCULATES NUMBER OF DESERTING TROOPS

   ("get_desert_troops", #CABA - check this
    [
        (party_get_morale, ":commander_party_morale", "$enlisted_party"), #does this actually get tracked for non-player parties?
        (store_current_day, ":cur_day"),
        #formula for soldier desertion chance
        #gets number of days served
		(troop_get_slot, ":service_day_start", "trp_player", slot_troop_freelancer_start_date),
        (store_sub, ":service_length", ":cur_day", ":service_day_start"),
        #inverts the commander's party morale
        (store_sub, ":commander_neg_morale", 100, ":commander_party_morale"), #still a positive number... 100-80 = 20
        (store_skill_level, ":cur_leadership", "skl_leadership", "trp_player"),
        (store_skill_level, ":cur_persuasion", "skl_persuasion", "trp_player"),
        #had to multiply these skills to give them a decent effect on desertion chance
        (val_mul, ":cur_leadership", 10), #up to 100
        (val_mul, ":cur_persuasion", 10), #up to 100
        (store_add, ":desert_chance", ":cur_leadership", ":cur_persuasion"), #up to 200
		(val_add, ":desert_chance", ":service_length"), #up to 400 maybe
        (val_add, ":desert_chance", ":commander_neg_morale"), #up to 450, maybe? if party morale is down to 50
        #loop that looks at each troop stack in a party, 
        #then decides if troops of that stack will desert, 
        #and randomly assigns a number of troops in that stack to desert
        (party_get_num_companion_stacks, ":num_stacks", "$enlisted_party"),
        (try_for_range_backwards, ":cur_stack", 1, ":num_stacks"),
            #limit may need changed for more accurate probability
            (store_random_in_range, ":desert_random", 0, 1000),
            (is_between, ":desert_random", 0, ":desert_chance"),
			#switching deserting troops to player party
			(party_stack_get_troop_id, ":desert_troop", "$enlisted_party", ":cur_stack"),
			(party_stack_get_size, ":stack_size", "$enlisted_party", ":cur_stack"),
			(store_random_in_range, ":stack_amount", 0, ":stack_size"),
			(party_remove_members, "$enlisted_party", ":desert_troop", ":stack_amount"),
			(party_add_members, "p_main_party", ":desert_troop", ":stack_amount"),
        (try_end),        		
    ]),
	
  ("freelancer_keep_field_loot",
   [
	(get_player_agent_no, ":player"),
	(try_for_range, ":ek_slot", ek_item_0, ek_head),
		(agent_get_item_slot, ":item", ":player", ":ek_slot"), 
		(gt, ":item", 0),
		(neg|troop_has_item_equipped, "trp_player", ":item"),
		(troop_add_item, "trp_player", ":item"),
	(try_end),
	(agent_get_horse, ":horse", ":player"),
	(try_begin),
	  (gt, ":horse", 0),
	  (agent_get_item_id, ":horse", ":horse"),
	  (troop_get_inventory_slot, ":old_horse", "trp_player", ek_horse),
	  (neq, ":horse", ":old_horse"),
	  (try_begin),
		(gt, ":old_horse", 0),
		(troop_get_inventory_slot_modifier, ":horse_imod", "trp_player", ek_horse),
		(troop_add_item, "trp_player", ":old_horse", ":horse_imod"),
	  (try_end),
	  (troop_set_inventory_slot, "trp_player", ek_horse, ":horse"),
	(try_end),
   ]),
	  
   ("cf_freelancer_player_can_upgrade",
   #Reg0 outputs reason for failure
   [
	(store_script_param_1, ":source_troop"),
	
	(troop_get_inventory_capacity, ":troop_cap", ":source_troop"),	
	(assign, ":continue", 1),
	
	(assign, ":type_available", 0),
	(assign, ":type_count", 0),
	(assign, ":end", itp_type_arrows),
	(try_for_range, ":type", itp_type_one_handed_wpn, ":end"),
		#Count Items from Source Troop
		(assign, ":end2", ":troop_cap"),
		(try_for_range, ":inv_slot", 0, ":end2"),
		    (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
			(gt, ":item", 0),
			(item_get_type, ":item_type", ":item"),
			(eq, ":item_type", ":type"),
			(val_add, ":type_count", 1),
			(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
			(eq, reg0, 1),		
			(assign, ":type_available", 1),
			(assign, ":end2", 0), #break
		(try_end),
		(eq, ":type_available", 1),
		(assign, ":end", itp_type_one_handed_wpn), #break
	(try_end), #Melee loop
	(try_begin),
		(eq, ":type_available", 0),
		(gt, ":type_count", 0), #only care if there were items possible to equip
		(assign, ":continue", 0),
		(assign, reg0, 0),
	(try_end),
	(eq, ":continue", 1),
	
	(assign, ":type_available", 0),
	(assign, ":type_count", 0),
	(assign, ":end2", ":troop_cap"),
	(try_for_range, ":inv_slot", 0, ":end2"),
		(troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
		(gt, ":item", 0),
		(item_get_type, ":item_type", ":item"),
		(eq, ":item_type", itp_type_body_armor),
		(val_add, ":type_count", 1),
		(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
		(eq, reg0, 1),		
		(assign, ":type_available", 1),
		(assign, ":end2", 0), #break
	(try_end),
	(try_begin),
		(eq, ":type_available", 0),
		(gt, ":type_count", 0), #only care if there were items possible to equip
		(assign, ":continue", 0),
		(assign, reg0, 1),
	(try_end),
	(eq, ":continue", 1),
	
	(try_begin),
		(troop_is_guarantee_ranged, ":source_troop"),
		(assign, ":type_available", 0),
		(assign, ":type_count", 0),
		(assign, ":end", itp_type_goods),
		(try_for_range, ":type", itp_type_bow, ":end"),
			#Count Items from Source Troop
			(assign, ":end2", ":troop_cap"),
			(try_for_range, ":inv_slot", 0, ":end2"),
				(troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
				(gt, ":item", 0),
				(item_get_type, ":item_type", ":item"),
				(eq, ":item_type", ":type"),
				(val_add, ":type_count", 1),
				(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
				(eq, reg0, 1),		
				(assign, ":type_available", 1),
				(assign, ":end2", 0), #break
			(try_end),
			(eq, ":type_available", 1),
			(assign, ":end", itp_type_bow), #break
		(try_end), #Ranged loop
		(eq, ":type_available", 0),
		(gt, ":type_count", 0), #only care if there were items possible to equip
		(assign, ":continue", 0),
		(assign, reg0, 2), 
	(try_end),
	(eq, ":continue", 1),
	
	(try_begin),
		(troop_is_guarantee_horse, ":source_troop"),
		(assign, ":type_available", 0),
		(assign, ":type_count", 0),
		(assign, ":end2", ":troop_cap"),
		(try_for_range, ":inv_slot", 0, ":end2"),
			(troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
			(gt, ":item", 0),
			(item_get_type, ":item_type", ":item"),
			(eq, ":item_type", itp_type_horse),
			(val_add, ":type_count", 1),
			(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
			(eq, reg0, 1),		
			(assign, ":type_available", 1),
			(assign, ":end2", 0), #break
		(try_end),
		(eq, ":type_available", 0),
		(gt, ":type_count", 0), #only care if there were items possible to equip
		(assign, ":continue", 0),
		(assign, reg0, 3),
	(try_end),
	(eq, ":continue", 1),	
   ]),
   
   
    ("freelancer_equip_troop",
   [
    (store_script_param_1, ":source_troop"),
	
	(str_clear, s2),
	(set_show_messages, 0),
	
	(assign, ":recording_slot", slot_freelancer_equip_start),	
	(troop_get_inventory_capacity, ":troop_cap", ":source_troop"),
	(assign, ":melee_given", 0),
	(assign, ":needs_ammo", 0),
	(assign, ":open_weapon_slot", 0),
	(try_for_range, ":type", itp_type_horse, itp_type_pistol),
	    (neq, ":type", itp_type_goods),
		(neq, ":type", itp_type_arrows),
		(neq, ":type", itp_type_bolts),
		
		#Assign Prob. of Getting Type
		(assign, ":continue", 0),
		(try_begin),
			(troop_is_guarantee_horse, ":source_troop"),
		    (eq, ":type", itp_type_horse),
			(assign, ":continue", 1),
		(else_try),
		    (troop_is_guarantee_ranged, ":source_troop"),
		    (this_or_next|eq, ":type", itp_type_bow),
			(this_or_next|eq, ":type", itp_type_crossbow),
			(eq, ":type", itp_type_thrown),
			(assign, ":continue", 1),
		(else_try),
		    (this_or_next|eq, ":type", itp_type_shield), #Shields and all armor pieces are guaranteed
		    (ge, ":type", itp_type_head_armor),
			(assign, ":continue", 1),
		(else_try),
		    (neq, ":type", itp_type_horse),
		    (lt, ":open_weapon_slot", 4),
			(store_random_in_range, ":continue", 0, 3), # 1 chance in three of being 1
		(try_end),
		(eq, ":continue", 1),		
		
		#Clear Temp Array
		(try_for_range, ":inv_slot", 0, 20),
			(troop_set_slot, "trp_temp_array_a", ":inv_slot", 0),
		(try_end),	
		
		#Collect Items from Source Troop
		(assign, ":type_count", 0),
		(try_for_range, ":inv_slot", 0, ":troop_cap"),
		    (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
			(gt, ":item", 0),
			(item_get_type, ":item_type", ":item"),
			(eq, ":item_type", ":type"),
			(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
			(eq, reg0, 1),		
			(troop_set_slot, "trp_temp_array_a", ":type_count", ":item"),
			(val_add, ":type_count", 1),
		(try_end),
		(gt, ":type_count", 0),
		
		#Pick Random Item of Type from Troop
		(try_begin),
		    (eq, ":type_count", 1),
			(assign, ":index", 0),
		(else_try),
			(store_random_in_range, ":index", 0, ":type_count"),
		(try_end),
		(troop_get_slot, ":item", "trp_temp_array_a", ":index"),
		(gt, ":item", 0),		
		(str_store_item_name, s3, ":item"),
		(str_store_string, s2, "@{s3}, {s2}"),
		
		#Select correct EK slot to force equip
		(try_begin),
		    (eq, ":type", itp_type_horse),
			(assign, ":ek_slot", ek_horse),
		(else_try),
		    (is_between, ":type", itp_type_head_armor, itp_type_pistol),
			(store_sub, ":shift", ":type", itp_type_head_armor),
			(store_add, ":ek_slot", ek_head, ":shift"),
		(else_try),
			(store_add, ":ek_slot", ek_item_0, ":open_weapon_slot"),
		(try_end),
		
		#Check for item already there, move it if present
		(try_begin),
		    (troop_get_inventory_slot, ":old_item", "trp_player", ":ek_slot"),
			(gt, ":old_item", 0),
			(troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ":ek_slot"),
			(troop_add_item, "trp_player", ":old_item", ":old_item_imod"),
		(try_end),
		
		#Add Item
		(troop_set_inventory_slot, "trp_player", ":ek_slot", ":item"),
		(party_set_slot, "p_freelancer_party_backup", ":recording_slot", ":item"),
		(val_add, ":recording_slot", 1),
		(try_begin),
		    (is_between, ":type", itp_type_one_handed_wpn, itp_type_head_armor), #Uses one of the 4 weapon slots
		    (val_add, ":open_weapon_slot", 1),
			(try_begin),
				(is_between, ":type", itp_type_one_handed_wpn, itp_type_arrows),
				(assign, ":melee_given", 1),
            (else_try),
				(eq, ":type", itp_type_bow),
				(assign, ":needs_ammo", itp_type_arrows),
			(else_try),
				(eq, ":type", itp_type_crossbow),
				(assign, ":needs_ammo", itp_type_bolts),
			(try_end),
		(try_end),
	(try_end), #Item Types Loop
	 
    #add ammo for any equipped bow
    (try_begin),
	    (neq, ":needs_ammo", 0),		
		#Check for item already in the last slot, move it if present
		(try_begin), 
		    (troop_get_inventory_slot, ":old_item", "trp_player", ek_item_3),
			(gt, ":old_item", 0),
			(troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ek_item_3),
			(troop_add_item, "trp_player", ":old_item", ":old_item_imod"), 
		(try_end),
		
		(assign, ":end", ":troop_cap"),
		(try_for_range, ":inv_slot", 0, ":end"),
		    (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
			(gt, ":item", 0),
			(item_get_type, ":type", ":item"),
			(eq, ":type", ":needs_ammo"),
			(troop_set_inventory_slot, "trp_player", ek_item_3, ":item"),
			(party_set_slot, "p_freelancer_party_backup", ":recording_slot", ":item"),
		    (val_add, ":recording_slot", 1),
			(assign, ":open_weapon_slot", 4),
			(str_store_item_name, s3, ":item"),
		    (str_store_string, s2, "@{s3}, {s2}"),
			(assign, ":end", 0),
		(try_end),
	(try_end), 
	
	#double check melee was given
	(try_begin),
	    (eq, ":melee_given", 0),
		(assign, ":end", ":troop_cap"),
		(try_for_range, ":inv_slot", 0, ":end"),
		    (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
			(gt, ":item", 0),
			(item_get_type, ":type", ":item"),
			(is_between, ":type", itp_type_one_handed_wpn, itp_type_arrows),
			(call_script, freelancer_can_use_item, "trp_player", ":item", 0),
			(eq, reg0, 1),	
			(try_begin),
			    (gt, ":open_weapon_slot", 3),
			    (assign, ":open_weapon_slot", 2),
			(try_end),
			
			#Check for item already there
			(try_begin),
				(troop_get_inventory_slot, ":old_item", "trp_player", ":open_weapon_slot"),
				(gt, ":old_item", 0),
				(troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ":open_weapon_slot"),
				(troop_add_item, "trp_player", ":old_item", ":old_item_imod"),
			(try_end),
			
			(troop_set_inventory_slot, "trp_player", ":open_weapon_slot", ":item"),		
			(party_set_slot, "p_freelancer_party_backup", ":recording_slot", ":item"),
		    (val_add, ":recording_slot", 1),
			(str_store_item_name, s3, ":item"),
		    (str_store_string, s2, "@{s3}, {s2}"),
		    (assign, ":end", 0),
		(try_end),
	(try_end), 
	
    (set_show_messages, 1),
	(try_begin),
		(neg|str_is_empty, s2),
		(val_sub, ":recording_slot", slot_freelancer_equip_start),
		(party_set_slot, "p_freelancer_party_backup", slot_freelancer_equip_start - 1, ":recording_slot"),	#Record Number of Items Added
		
		(str_store_troop_name, s1, ":source_troop"),
		(display_message, "@The equipment of a {s1}: {s2}is assigned to you."),	
	(try_end),
   ]),
	
  ("freelancer_unequip_troop",
   [
    (store_script_param_1, ":source_troop"),

	(str_clear, s2),	
	(set_show_messages, 0),
	
	(party_get_slot, ":num_items", "p_freelancer_party_backup", slot_freelancer_equip_start - 1), #Num of items previously given
	
    (troop_get_inventory_capacity, ":cap", "trp_player"),		
	(try_for_range, ":i", 0, ":num_items"),
	    (store_add, ":slot", slot_freelancer_equip_start, ":i"),
	    (party_get_slot, ":given_item", "p_freelancer_party_backup", ":slot"),
		(gt, ":given_item", 0),
		
		(assign, ":end", ":cap"),
		(try_for_range, ":inv_slot", 0, ":end"),
			(troop_get_inventory_slot, ":item", "trp_player", ":inv_slot"),
			(eq, ":item", ":given_item"),			
			(troop_get_inventory_slot_modifier, ":imod", "trp_player", ":inv_slot"),
			(eq, ":imod", 0), #Native troop items never have modifiers
			
			(troop_set_inventory_slot, "trp_player", ":inv_slot", -1),
			(str_store_item_name, s3, ":item"),
			(str_store_string, s2, "@{s3}, {s2}"),
			
			(assign, ":end", 0), #Break
		(try_end), #Player Inventory Loop
	(try_end), #Item Given Slot Loop

	(set_show_messages, 1),
	(try_begin),
		(neg|str_is_empty, s2),
		(party_set_slot, "p_freelancer_party_backup", slot_freelancer_equip_start - 1, 0),	#Reset Number of Items Added
		(str_store_troop_name, s1, ":source_troop"),
		(display_message, "@The equipment of a {s1}: {s2}is taken from you."),
	(try_end),	
	(troop_equip_items, "trp_player"),
   ]), 
#+freelancer end

Module Dialogs'ta şunu bulun:
Code:
 "Thanks, I'll keep it in mind.", "ramun_pre_talk",[]],
Altına bunu ekleyin:
Code:
# dialog_ask_enlistment

    [anyone|plyr,"lord_talk", [
        (eq, "$freelancer_state", 0),
		(ge, "$g_talk_troop_faction_relation", 0),
        #(neq, "$players_kingdom", "$g_talk_troop_faction"),
        (eq, "$players_kingdom", 0),
        ],
    "My Lord, I would like to like to enlist in your army.", "lord_request_enlistment",[]],
	
	# dialog_advise_retirement

    [anyone|plyr,"lord_talk", [
        (eq, "$g_talk_troop", "$enlisted_lord"),
		(neq, "$freelancer_state", 0),
        (ge, "$g_talk_troop_faction_relation", 0),
        (neq, "$players_kingdom", "$g_talk_troop_faction"),
        (eq, "$players_kingdom", 0),
        ],
    "My Lord, I would like to like to retire from service.", "lord_request_retire",[]],
	
	#dialog_ask_leave
    [anyone|plyr,"lord_talk",[
		(eq, "$g_talk_troop", "$enlisted_lord"),
		(eq, "$freelancer_state", 1),
        (ge, "$g_talk_troop_faction_relation", 0),
        (neq, "$players_kingdom", "$g_talk_troop_faction"),
        (eq, "$players_kingdom", 0),
        ],
        "My Lord, I would like to request some personal leave", "lord_request_vacation",[]],  
		
	#dialog_ask_return_from_leave
		[anyone|plyr,"lord_talk",[
		(eq, "$g_talk_troop", "$enlisted_lord"),
		(eq, "$freelancer_state", 2),
        (ge, "$g_talk_troop_faction_relation", 0),
        (neq, "$players_kingdom", "$g_talk_troop_faction"),
        (eq, "$players_kingdom", 0),
        ],
        "My Lord, I am ready to return to your command.", "ask_return_from_leave",[]],	
]
		  
# dialog_accept_enlistment

    [anyone,"lord_request_enlistment",
    [
        (ge, "$g_talk_troop_relation", 0),
		(try_begin),
			(neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_freelancer_troop, 0),
			(faction_get_slot, reg1, "$g_talk_troop_faction", slot_faction_freelancer_troop),
		(else_try),
			(faction_get_slot, reg1, "$g_talk_troop_faction", slot_faction_tier_1_troop),
		(try_end),
		(str_store_troop_name, s1, reg1),
		(store_character_level, reg1, reg1),
		(val_mul, reg1, 10),		
		(str_store_string, s2, "str_reg1_denars"),
    ], "I've got room in my ranks for a {man/woman} of your disposition, {playername}.  I can take you on as a {s1}, with a weekly pay of {s2}. And food, of course.  Plenty of room for promotion and you'll be equipped as befits your rank. You'll have your take of what you can scavange in battle, too.  What do you say?", "lord_request_enlistment_confirm", []],
		
    [anyone|plyr,"lord_request_enlistment_confirm", [],
    "Seems a fair lot and steady work in these lands. I'm with you, my lord.", "close_window",
	[
	    (party_clear, "p_freelancer_party_backup"),
       	(call_script, "script_party_copy", "p_freelancer_party_backup", "p_main_party"),
		(remove_member_from_party, "trp_player","p_freelancer_party_backup"),
        (call_script, "script_event_player_enlists"),
		(assign, "$g_infinite_camping", 1),
        (rest_for_hours_interactive, 24 * 365, 5, 1),
		(eq,"$talk_context",tc_party_encounter),
		(assign, "$g_leave_encounter", 1),
	]],

	[anyone|plyr,"lord_request_enlistment_confirm",[],
    "Well, on second thought my lord, I might try my luck alone a bit longer. My thanks.", "lord_pretalk",[]],
	
# dialog_reject_enlistment

    [anyone,"lord_request_enlistment", [(lt, "$g_talk_troop_relation", 0)],
    "I do not trust you enough to allow you to serve for me.", "lord_pretalk",[]],

   

# dialog_lord_accept_retire 

    [anyone,"lord_request_retire",
    [		
    ],
    "Very well {playername}. You are relieved of duty.", "lord_pretalk",[
	(call_script, "script_event_player_discharge"),
	(call_script, "script_party_restore"),
	(change_screen_map),
	],
	],	
	
#dialog_accept_leave  
    [anyone,"lord_request_vacation",
        [
        (ge, "$g_talk_troop_relation", 0),
		],
            "Very well {playername}. You shall take some time off from millitary duty. Return in two weeks.", "lord_pretalk",[
		(call_script, "script_event_player_vacation"),
       	(call_script, "script_party_restore"),
		(change_screen_map),
		],
		],
					

				
	
#dialog_accept_ask_return_from_leave
        [anyone,"ask_return_from_leave",
        [
        (ge, "$g_talk_troop_relation", 0),
		],
        "Welcome back {playername}. Your regiment has missed you I daresay, Now return to your post.", "lord_pretalk",[
        (call_script, "script_party_copy", "p_freelancer_party_backup", "p_main_party"),
		(remove_member_from_party, "trp_player","p_freelancer_party_backup"),
        (call_script, "script_event_player_returns_vacation"),
		(change_screen_map),
		],
		],	
#+freelancer end
 

fbalo1908

Master Knight
WBWF&SVC
HyperCharge said:
mission template için verdiğin şey en alta değil en üste koyulur.
Düzeltiyorum hemen. Bug yok. Txt'den yapılmaz büyük ihtimalle. Ama freelancer modu üzerine txt üzerinden modunu yaparsan hem freelancer hem de diplomasi olur modunda.
 

1ksk2le

Veteran
Kastım o değil.Örneğin {!}Your commander's party has been defeated and you have been captured. Return to the service of {s13} of {s14}. kısmını türkçe çevirerek yazabilirdin.
 

fbalo1908

Master Knight
WBWF&SVC
Yukarıda cevap verdim txt sorusuna :smile:
Amaç sadece orduya katılmak. Diplomasi eklemeyi çözebilirsem onun da dersini yaparım :smile:
 

AslanlıYol461

Sergeant Knight
fbalo1908 said:
Yukarıda cevap verdim txt sorusuna :smile:
Amaç sadece orduya katılmak. Diplomasi eklemeyi çözebilirsem onun da dersini yaparım :smile:
Görmedim k bakma

Bu arada KontrGerilla
Soru sormak da mı yasak TxT'den bir şey yapılmaz diyorsun
Mamma Li turchi yi de görmüyorsun
Nasıl oluyor

Edit: freelancer osp mi öyleyse onun üstüne yapayım değilse izin almakla uğraşmam gerekecek
 

aliemre461

Banned
AslanlıYol461 said:
fbalo1908 said:
Yukarıda cevap verdim txt sorusuna :smile:
Amaç sadece orduya katılmak. Diplomasi eklemeyi çözebilirsem onun da dersini yaparım :smile:
Görmedim k bakma

Bu arada KontrGerilla
Soru sormak da mı yasak TxT'den bir şey yapılmaz diyorsun
Mamma Li turchi yi de görmüyorsun
Nasıl oluyor

Mama li turci sadece itemleri txtden ekledi o kadar diğer kkodlqrı modül ile yaptı nerden biliyosun dersen yardım etmiştim bayağ bi kaç kodda :wink:
 

fbalo1908

Master Knight
WBWF&SVC
Mamma li Turchi başta module system kullandı ama. Tamamen txt dosyaları üzerinden krallık falan eklemek imkansız neredeyse.
edit: Freelancer osp.
 

AslanlıYol461

Sergeant Knight
aliemre461 said:
AslanlıYol461 said:
fbalo1908 said:
Yukarıda cevap verdim txt sorusuna :smile:
Amaç sadece orduya katılmak. Diplomasi eklemeyi çözebilirsem onun da dersini yaparım :smile:
Görmedim k bakma

Bu arada KontrGerilla
Soru sormak da mı yasak TxT'den bir şey yapılmaz diyorsun
Mamma Li turchi yi de görmüyorsun
Nasıl oluyor

Mama li turci sadece itemleri txtden ekledi o kadar diğer kkodlqrı modül ile yaptı nerden biliyosun dersen yardım etmiştim bayağ bi kaç kodda :wink:
Sceneleri troopları , kısacası devriye ve Krallık ekleme ve birkaç kod dışında her şeyi TxT'den yaptı diye biliyorum
 
Top Bottom