Hello.
I have create a new party with same faction with player (i:e $players_kingdom) with party_templates, to act as escort/bodyguard to player party, so they can join player battle when their near him. i succeed in making them had same faction with player and set their behaviour to ai_bhvr_escort_party.
But they didn't join the player battle even when they close with player party. I've set their personality to new copy of soldier_personality with extra courage added in it.
Here's the code
module_dialog.py
module_script.py
I tried to make my own version of diplomacy patrol but with lord task option (Follow me, Reinforce place, etc) instead of default diplomacy patrol task option
Thankyou.
I have create a new party with same faction with player (i:e $players_kingdom) with party_templates, to act as escort/bodyguard to player party, so they can join player battle when their near him. i succeed in making them had same faction with player and set their behaviour to ai_bhvr_escort_party.
But they didn't join the player battle even when they close with player party. I've set their personality to new copy of soldier_personality with extra courage added in it.
Here's the code
module_dialog.py
Code:
[anyone|plyr,"regular_member_talk", [], "Lead a field army", "fa_check",[]],
##field army begin +
[anyone|plyr, "fa_check", [
(call_script, "script_check_for_patrols"),
(store_skill_level,":max_amount",skl_leadership,"trp_player"),
(troop_get_slot, ":renown", "trp_player", slot_troop_renown),
(val_div, ":renown", 100),
(val_add, ":max_amount",":renown"),
(try_for_range,":num",walled_centers_begin,walled_centers_end),
(party_slot_eq, ":num", slot_town_lord, "trp_player"),
(val_add,":max_amount",1),
(try_end),
(gt,":max_amount",reg0),
],"Very well.","close_window",[
(store_conversation_troop,":soldier"),
(remove_member_from_party,":soldier"),
(call_script, "script_fa_send_party", "p_main_party", ":soldier", "$players_kingdom",),#"fac_player_faction" "$players_kingdom"
#(spawn_around_party,"p_main_party","pt_player_field_army"),
#(party_set_slot, reg(0), slot_party_type, spt_field_army),
#(party_add_members,reg(0),":soldier",1),
#(party_set_ai_behavior,reg(0),ai_bhvr_escort_party),
]],
[anyone,"fa_check", [],"I am sorry {sir/madam}, but we don't think that you capable to sendind more field army.","member_chat",[]],
module_script.py
Code:
("fa_send_party",
[
(store_script_param, ":start_party", 1),
#(store_script_param, ":target_party", 2),
(store_script_param, ":soldier", 2),
(store_script_param, ":player_fac", 3),
(spawn_around_party, ":start_party","pt_player_field_army"),
(assign,":spawned_party",reg0),
(party_set_faction, ":spawned_party", ":player_fac"),
(party_set_slot, ":spawned_party", slot_party_type, spt_player_field_army),
#(party_set_slot, ":spawned_party", slot_party_home_center, ":start_party"),
(str_store_party_name, s5, ":start_party"),
(party_set_name, ":spawned_party", "@{s5} Field Army"),
(party_add_members, ":spawned_party",":soldier",1),
(party_set_ai_behavior, ":spawned_party", ai_bhvr_escort_party),
#(party_set_ai_object, ":spawned_party", ":target_party"),
#(party_set_slot, ":spawned_party", slot_party_ai_object, ":target_party"),
#(party_set_slot, ":spawned_party", slot_party_ai_state, spai_patrolling_around_center),
#(call_script, "script_party_add_party", ":spawned_party", ":spawned_party"),
]),
I tried to make my own version of diplomacy patrol but with lord task option (Follow me, Reinforce place, etc) instead of default diplomacy patrol task option
Thankyou.