90 23 2 1224979098644774912 1 23 2 1224979098644774913 2 23 2 1224979098644774914 3 23 2 1224979098644774915 4 521 3 1224979098644774916 1224979098644774913 0 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 -1 2133 2 1224979098644774919 0 2173 2 1224979098644774920 1224979098644774912 4 0 31 2 1224979098644774914 1 522 3 1224979098644774921 1224979098644774920 8 30 2 1224979098644774921 0 520 3 1224979098644774922 1224979098644774921 10 5 0 520 3 1224979098644774922 1224979098644774912 10 3 0 2133 2 144115188075857003 0 4 0 2147483780 1 1224979098644774922 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786821 5 0 2204 2 1224979098644774923 1224979098644774913 2190 3 1224979098644774924 1224979098644774923 1224979098644774920 30 2 1224979098644774924 0 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786822 5 0 1073741855 2 1224979098644774916 3 31 2 1224979098644774916 2 2133 2 1224979098644774925 -1 4 0 2147484189 3 1224979098644774913 54 -1 521 3 1224979098644774926 1224979098644774913 54 132 1 1224979098644774926 2204 2 1224979098644774925 1224979098644774926 3 0 2147483679 2 1224979098644774925 -1 2147483679 2 1224979098644774925 1224979098644774920 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786823 5 0 31 2 1224979098644774916 4 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786825 5 0 521 3 1224979098644774927 1224979098644774922 56 521 3 1224979098644774928 1224979098644774922 59 521 3 1224979098644774929 1224979098644774922 57 2120 3 1224979098644774930 1224979098644774927 1224979098644774928 2105 2 1224979098644774930 1224979098644774929 4 0 541 3 1224979098644774913 7 360287970189639680 521 3 1224979098644774931 1224979098644774913 56 521 3 1224979098644774932 1224979098644774913 57 2105 2 1224979098644774931 1224979098644774932 2107 2 1224979098644774931 6 5 0 521 3 1224979098644774931 1224979098644774913 56 521 3 1224979098644774932 1224979098644774913 57 2105 2 1224979098644774931 1224979098644774932 3 0 2111 2 1224979098644774931 1 2122 3 1224979098644774919 1224979098644774930 100 2108 2 1224979098644774919 1224979098644774931 2111 2 1224979098644774919 1 2105 2 1224979098644774919 300 2147483678 2 1224979098644774919 150 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786833 5 0 32 2 0 31 30 2 1224979098644774931 1224979098644774930 2133 2 1224979098644774917 -1 2133 2 1224979098644774918 216172782113786834 5 0 2133 2 1224979098644774933 1224979098644774919 2133 2 1224979098644774917 1224979098644774933 4 0 2147483680 2 1224979098644774933 144115188075856915 2147483680 2 1224979098644774915 311 2133 2 1224979098644774918 216172782113786837 5 0 2133 2 1224979098644774918 216172782113786838 3 0 3 0 2133 2 72057594037927936 1224979098644774917 2133 2 72057594037927937 1224979098644774918 2133 2 72057594037927938 1224979098644774919
11 23 2 1224979098644774912 1 2173 2 1224979098644774913 1224979098644774912 4 0 2147483679 2 1224979098644774913 -1 2133 2 1224979098644774914 -1 2133 2 1224979098644774915 0 2133 2 1224979098644774916 -1 3 0 2133 2 72057594037927936 1224979098644774914 2133 2 72057594037927937 1224979098644774915 2133 2 72057594037927938 1224979098644774916
("npc_decision_checklist_evaluate_enemy_center_for_attack",
[
#NOTES -- LAST OFFENSIVE TIME SCORE IS NOT USED
(store_script_param, ":troop_no", 1),
(store_script_param, ":potential_target", 2),
(store_script_param, ":attack_by_faction", 3),
(store_script_param, ":all_vassals_included", 4),
(party_get_slot,":party_type",":potential_target",0),#Agland
(assign, ":result", -1),
(assign, ":explainer_string", -1),
#(assign, ":reason_is_obvious", 0),
(assign, ":power_ratio", 0),
#(assign, ":hours_since_last_recce", -1),
#(assign, ":value_of_target", 0),
#(assign, ":difficulty_of_capture", 0),
(store_faction_of_troop, ":faction_no", ":troop_no"),
(try_begin),
(eq, ":attack_by_faction", 1),
(faction_get_slot, ":faction_marshal", ":faction_no", slot_faction_marshall),
(ge, ":faction_marshal", 0), #STEVE ADDITION TO AVOID MESSAGE SPAM
(troop_get_slot, ":party_no", ":faction_marshal", slot_troop_leaded_party),
(else_try),
(troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party),
(try_end),
(assign, "$g_use_current_ai_object_as_s8", 0),
#THE FIRST BATCH OF DISQUALIFYING CONDITIONS DO NOT REQUIRE THE ATTACKING PARTY TO HAVE CURRENT INTELLIGENCE ON THE TARGET
(try_begin),
(neg|party_is_active, ":party_no"),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_party_not_active"),
#(assign, ":reason_is_obvious", 1),
(else_try),
(store_faction_of_party, ":potential_target_faction", ":potential_target"),
(store_relation, ":relation", ":potential_target_faction", ":faction_no"),
(ge, ":relation", 0),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_is_friendly"),
#(assign, ":reason_is_obvious", 1),
(else_try),
#(is_between, ":potential_target", walled_centers_begin, walled_centers_end),
(this_or_next|eq, ":party_type", spt_town),#Agland
(eq, ":party_type", spt_castle),#Agland
(assign, ":faction_of_besieger_party", -1),
(try_begin),
(neg|party_slot_eq, ":potential_target", slot_center_is_besieged_by, -1),
(party_get_slot, ":besieger_party", ":potential_target", slot_center_is_besieged_by),
(party_is_active, ":besieger_party"),
(store_faction_of_party, ":faction_of_besieger_party", ":besieger_party"),
(try_end),
(neq, ":faction_of_besieger_party", -1),
(neq, ":faction_of_besieger_party", ":faction_no"),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_is_already_besieged"),
#(assign, ":reason_is_obvious", 1),
(else_try),
#(this_or_next|troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_upstanding),#Agland
#(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_goodnatured),#Agland
#(is_between, ":potential_target", villages_begin, villages_end),
(eq, ":party_type", spt_village),#Agland
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_marshal_does_not_want_to_attack_innocents"),
#DECISIONS BASED ON ENEMY STRENGTH BEGIN HERE
(else_try),
(party_get_slot, ":party_strength", ":party_no", slot_party_cached_strength),
(party_get_slot, ":follower_strength", ":party_no", slot_party_follower_strength),
(party_get_slot, ":strength_of_nearby_friend", ":party_no", slot_party_nearby_friend_strength),
(store_add, ":total_strength", ":party_strength", ":follower_strength"),
(val_add, ":total_strength", ":strength_of_nearby_friend"),
#(party_get_slot, ":potential_target_nearby_enemy_exact_strength", ":potential_target", slot_party_nearby_friend_strength),
#(assign, ":potential_target_nearby_enemy_strength", ":potential_target_nearby_enemy_exact_strength"),
(try_begin),
# (eq, ":party_type", spt_village), #Agland#(is_between, ":potential_target", villages_begin, villages_end),#Agland
# (assign, ":enemy_strength", 10),(party_slot_eq, ":potential_target", slot_town_lord, "trp_player"),(party_get_slot, ":enemy_strength", ":potential_target", slot_party_cached_strength),(party_get_slot, ":enemy_strength_nearby", ":potential_target", slot_party_nearby_friend_strength),(val_add, ":enemy_strength", ":enemy_strength_nearby"),(val_mul, ":enemy_strength",6),(else_try),
(party_get_slot, ":enemy_strength", ":potential_target", slot_party_cached_strength),
(party_get_slot, ":enemy_strength_nearby", ":potential_target", slot_party_nearby_friend_strength),
(val_add, ":enemy_strength", ":enemy_strength_nearby"),
(try_end),
(val_max, ":enemy_strength", 1),
#(this_or_next|troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_martial),#Agland,
#(this_or_next|troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_quarrelsome),#Agland,
#(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_selfrighteous),#Agland,
(store_mul, ":power_ratio", ":total_strength", 100),
(val_div, ":power_ratio", ":enemy_strength"),
(val_max, ":power_ratio", 1),#Agland,newly added
(val_add,":power_ratio",300),#Agland,newly added
(lt, ":power_ratio", 150),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_protected_by_enemy_army_aggressive"),
(else_try),
(gt, 0, 31),#Agland
(ge, ":enemy_strength", ":total_strength"), #if enemy is powerful
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_protected_by_enemy_army_cautious"),
(else_try),
#Agland
#(call_script, "script_calculate_center_assailability_score", ":troop_no", ":potential_target", ":all_vassals_included"),
#(assign, ":score", reg0),
#(assign, ":power_ratio", reg1),
(assign, ":score", ":power_ratio"),#Agland,newly added
(assign, ":result", ":score"),
(try_begin),
(le, ":score", "$g_faction_object_score"),
(le, ":all_vassals_included", 311),#Agland,pointless
(assign, ":explainer_string", "str_center_value_outweighed_by_difficulty_of_capture"),
(else_try),
#To Steve, does not this sentence needs to explain why we are not attacking that city?
#This sentence says it justifies, so why we are not attacking?
(assign, ":explainer_string", "str_center_value_justifies_the_difficulty_of_capture"),
(try_end),
(try_end),
(assign, reg0, ":result"),
(assign, reg1, ":explainer_string"),
(assign, reg2, ":power_ratio"),
]),
#script_find_center_to_defend
# INPUT:
# param1: faction_no
# OUTPUT:
# reg0 = center_to_defend (-1 if none is logical)
# reg1 = maximum_defend_score
# reg3 = enemy_strength_near_most_threatened_center
(
"find_center_to_defend",
[
(store_script_param, ":troop_no", 1),
(store_faction_of_troop, ":faction_no", ":troop_no"),
(try_begin),
(neq, ":faction_no", -1),
(assign, ":most_threatened_center", -1),
(assign, ":maximum_threat_score", 0),
(assign, ":enemy_strength_near_most_threatened_center", -1),
(try_end),
(assign, reg0, ":most_threatened_center"),
(assign, reg1, ":maximum_threat_score"),
(assign, reg2, ":enemy_strength_near_most_threatened_center"),
]),
("npc_decision_checklist_evaluate_enemy_center_for_attack",
[
#NOTES -- LAST OFFENSIVE TIME SCORE IS NOT USED
(store_script_param, ":troop_no", 1),
(store_script_param, ":potential_target", 2),
(store_script_param, ":attack_by_faction", 3),
(store_script_param, ":all_vassals_included", 4),
(party_get_slot,":party_type",":potential_target",0),#Agland
(assign, ":result", -1),
(assign, ":explainer_string", -1),
(assign, ":power_ratio", 0),
(store_faction_of_troop, ":faction_no", ":troop_no"),
(try_begin),
(eq, ":attack_by_faction", 1),
(faction_get_slot, ":faction_marshal", ":faction_no", slot_faction_marshall),
(ge, ":faction_marshal", 0), #STEVE ADDITION TO AVOID MESSAGE SPAM
(troop_get_slot, ":party_no", ":faction_marshal", slot_troop_leaded_party),
(else_try),
(troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party),
(try_end),
(assign, "$g_use_current_ai_object_as_s8", 0),
#THE FIRST BATCH OF DISQUALIFYING CONDITIONS DO NOT REQUIRE THE ATTACKING PARTY TO HAVE CURRENT INTELLIGENCE ON THE TARGET
(try_begin),
(neg|party_is_active, ":party_no"),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_party_not_active"),
(else_try),
(store_faction_of_party, ":potential_target_faction", ":potential_target"),
(store_relation, ":relation", ":potential_target_faction", ":faction_no"),
(ge, ":relation", 0),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_is_friendly"),
(else_try),
(this_or_next|eq, ":party_type", spt_town),#Agland
(eq, ":party_type", spt_castle),#Agland
(assign, ":faction_of_besieger_party", -1),
(try_begin),
(neg|party_slot_eq, ":potential_target", slot_center_is_besieged_by, -1),
(party_get_slot, ":besieger_party", ":potential_target", slot_center_is_besieged_by),
(party_is_active, ":besieger_party"),
(store_faction_of_party, ":faction_of_besieger_party", ":besieger_party"),
(try_end),
(neq, ":faction_of_besieger_party", -1),
(neq, ":faction_of_besieger_party", ":faction_no"),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_is_already_besieged"),
(else_try),
(eq, ":party_type", spt_village),#Agland
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_marshal_does_not_want_to_attack_innocents"),
#DECISIONS BASED ON ENEMY STRENGTH BEGIN HERE
(else_try),
(party_get_slot, ":party_strength", ":party_no", slot_party_cached_strength),
(party_get_slot, ":follower_strength", ":party_no", slot_party_follower_strength),
(party_get_slot, ":strength_of_nearby_friend", ":party_no", slot_party_nearby_friend_strength),
(store_add, ":total_strength", ":party_strength", ":follower_strength"),
(val_add, ":total_strength", ":strength_of_nearby_friend"),
(try_begin),
#Agland,newly added
(party_slot_eq, ":potential_target", slot_town_lord, "trp_player"),
(party_get_slot, ":enemy_strength", ":potential_target", slot_party_cached_strength),
(party_get_slot, ":enemy_strength_nearby", ":potential_target", slot_party_nearby_friend_strength),
(val_add, ":enemy_strength", ":enemy_strength_nearby"),
(val_mul, ":enemy_strength",6),
(else_try),
(party_get_slot, ":enemy_strength", ":potential_target", slot_party_cached_strength),
(party_get_slot, ":enemy_strength_nearby", ":potential_target", slot_party_nearby_friend_strength),
(val_add, ":enemy_strength", ":enemy_strength_nearby"),
(try_end),
(val_max, ":enemy_strength", 1),
(store_mul, ":power_ratio", ":total_strength", 100),
(val_div, ":power_ratio", ":enemy_strength"),
(val_max, ":power_ratio", 1),#Agland,newly added
(val_add,":power_ratio",300),#Agland,newly added
(lt, ":power_ratio", 150),
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_protected_by_enemy_army_aggressive"),
(else_try),
(gt, 0, 31),#Agland
(ge, ":enemy_strength", ":total_strength"), #if enemy is powerful
(assign, ":result", -1),
(assign, ":explainer_string", "str_center_protected_by_enemy_army_cautious"),
(else_try),
(assign, ":score", ":power_ratio"),#Agland,newly added
(assign, ":result", ":score"),
(try_begin),
(le, ":score", "$g_faction_object_score"),
(le, ":all_vassals_included", 311),#Agland,pointless
(assign, ":explainer_string", "str_center_value_outweighed_by_difficulty_of_capture"),
(else_try),
(assign, ":explainer_string", "str_center_value_justifies_the_difficulty_of_capture"),
(try_end),
(try_end),
(assign, reg0, ":result"),
(assign, reg1, ":explainer_string"),
(assign, reg2, ":power_ratio"),
]),
asinsaka 发表于 2023-2-24 10:26
烧村是精髓......
我烧村子喜欢少带点人,引起反抗,去屠农,李嗜民
地球上只有一国 发表于 2023-6-5 15:18
发现用了之后,大国变得很猛,国力较弱的国家很快就被灭了。可否修改成:“所有元帅ai会带领集团军攻击城堡 ...
战争傀儡阿格兰 发表于 2023-6-6 10:08
#script_find_center_to_defend
这个不要修改试试看
地球上只有一国 发表于 2023-6-6 22:18
改了,发现领主和元帅有时候会傻站或者跑几步,停停又跑几步。和他对话,说“我们正要去去破坏XX村”。
战争傀儡阿格兰 发表于 2023-6-7 08:25
开个作弊模式,看下游戏里提示英文最有价值的防守目标多少分?
| 欢迎光临 骑马与砍杀中文站论坛 (https://bbs.mountblade.com.cn/) | Powered by Discuz! X3.4 |