- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2024-11-12
平民
- UID
- 3254017
- 第纳尔
- 161
- 精华
- 0
- 互助
- 0
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2021-7-22
鲜花( 0) 鸡蛋( 0)
|
楼主 |
发表于 2021-8-17 23:20:22
|
显示全部楼层
大佬,不好意思又打扰你了。可能我表述有问题,我是想在原有的代码上进行修改。AI的城池兵力一般低于“X”个左右就会自动增加兵力,我想修改这个“X”。但是我不怎么看得懂代码,您可以帮帮我吗?
这是我想修改的代码:
(24.000000,
[
(try_for_range, ":var_0", "trp_npc_adonja", "trp_knight_1_1_wife"),
(troop_slot_eq, ":var_0", slot_troop_occupation, 2),
(troop_get_slot, ":var_1", ":var_0", slot_troop_leaded_party),
(ge, ":var_1", 1),
(party_is_active, ":var_1"),
(party_get_attached_to, ":var_2", ":var_1"),
(is_between, ":var_2", "p_town_1", "p_salt_mine"),
(party_slot_eq, ":var_2", slot_center_is_besieged_by, -1),
(store_faction_of_party, ":var_3", ":var_1"),
(try_begin),
(this_or_next|eq, ":var_3", "fac_player_supporters_faction"),
(eq, ":var_3", "$players_kingdom"),
(assign, ":var_4", 1),
(store_random_in_range, ":var_5", 0, 2),
(val_add, ":var_4", ":var_5"),
(else_try),
(game_get_reduce_campaign_ai, ":var_6"),
(try_begin),
(eq, ":var_6", 0),
(assign, ":var_4", 2),
(else_try),
(eq, ":var_6", 1),
(assign, ":var_4", 1),
(store_random_in_range, ":var_5", 0, 2),
(val_add, ":var_4", ":var_5"),
(else_try),
(eq, ":var_6", 2),
(assign, ":var_4", 1),
(try_end),
(try_end),
(try_begin),
(faction_slot_eq, ":var_3", slot_faction_marshall, ":var_0"),
(val_add, ":var_4", 1),
(try_end),
(try_for_range, ":var_7", 0, ":var_4"),
(call_script, "script_hire_men_to_kingdom_hero_party", ":var_0"),
(try_end),
(try_end),
(try_for_range, ":var_8", "p_town_1", "p_village_1"),
(neg|party_slot_eq, ":var_8", slot_town_lord, "trp_player"),
(party_slot_ge, ":var_8", slot_town_lord, 1),
(party_slot_eq, ":var_8", slot_center_is_besieged_by, -1),
(store_faction_of_party, ":var_9", ":var_8"),
(try_begin),
(this_or_next|eq, ":var_9", "fac_player_supporters_faction"),
(eq, ":var_9", "$players_kingdom"),
(assign, ":var_10", 450),
(else_try),
(game_get_reduce_campaign_ai, ":var_6"),
(assign, ":var_10", 450),
(try_begin),
(eq, ":var_6", 0),
(assign, ":var_10", 300),
(store_random_in_range, ":var_4", 0, 2),
(val_add, ":var_4", 1),
(else_try),
(eq, ":var_6", 1),
(assign, ":var_10", 450),
(assign, ":var_4", 1),
(else_try),
(eq, ":var_6", 2),
(assign, ":var_10", 600),
(store_random_in_range, ":var_4", 0, 2),
(try_end),
(try_end),
(try_for_range, ":var_7", 0, ":var_4"),
(party_get_slot, ":var_11", ":var_8", slot_town_wealth),
(assign, ":var_12", ":var_11"),
(val_div, ":var_12", 2),
(gt, ":var_12", ":var_10"),
(call_script, "script_cf_reinforce_party", ":var_8"),
(val_sub, ":var_11", ":var_10"),
(party_set_slot, ":var_8", slot_town_wealth, ":var_11"),
(try_end),
(try_end),
(try_for_range, ":var_8", "p_town_1", "p_salt_mine"),
(neg|is_between, ":var_8", "p_castle_1", "p_village_1"),
(call_script, "script_get_center_ideal_prosperity", ":var_8"),
(assign, ":var_13", reg0),
(party_get_slot, ":var_14", ":var_8", slot_town_prosperity),
(try_begin),
(gt, ":var_14", ":var_13"),
(call_script, "script_change_center_prosperity", ":var_8", -1),
(val_add, "$newglob_total_prosperity_from_convergence", -1),
(else_try),
(neg|ge, ":var_14", ":var_13"),
(call_script, "script_change_center_prosperity", ":var_8", 1),
(val_add, "$newglob_total_prosperity_from_convergence", 1),
(try_end),
(try_end), |
|