- 好友
- 0
- 在线时间
- 378 小时
- 最后登录
- 2014-11-15
平民
- UID
- 366981
- 第纳尔
- 114
- 精华
- 0
- 互助
- 0
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2011-1-20
鲜花( 0) 鸡蛋( 0)
|
发表于 2012-6-15 10:24:09
|
显示全部楼层
我想问一下村庄与城镇或城堡的隶属关系是自己编辑的还是在城镇一定范围内的村庄都隶属于这个城镇。如果能编辑的话怎么编辑。我增加了一个新城镇后进游戏发现它附近的几个村庄都改变了势力。还有为什么在module_parti ...
xtzd2 发表于 2012-6-14 13:53
这个是相关代码:
script_game_start:
# fill_village_bound_centers
#pass 1: Give one village to each castle
(try_for_range, ":cur_center", castles_begin, castles_end),
(assign, ":min_dist", 999999),
(assign, ":min_dist_village", -1),
(try_for_range, ":cur_village", villages_begin, villages_end),
(neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
(store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_center"),
(lt, ":cur_dist", ":min_dist"),
(assign, ":min_dist", ":cur_dist"),
(assign, ":min_dist_village", ":cur_village"),
(try_end),
(party_set_slot, ":min_dist_village", slot_village_bound_center, ":cur_center"),
(store_faction_of_party, ":town_faction", ":cur_center"),
(call_script, "script_give_center_to_faction_aux", ":min_dist_village", ":town_faction"),
(try_end),
#pass 2: Give other villages to closest town.
(try_for_range, ":cur_village", villages_begin, villages_end),
(neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
(assign, ":min_dist", 999999),
(assign, ":min_dist_town", -1),
(try_for_range, ":cur_town", towns_begin, towns_end),
(store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_town"),
(lt, ":cur_dist", ":min_dist"),
(assign, ":min_dist", ":cur_dist"),
(assign, ":min_dist_town", ":cur_town"),
(try_end),
(party_set_slot, ":cur_village", slot_village_bound_center, ":min_dist_town"),
(store_faction_of_party, ":town_faction", ":min_dist_town"),
(call_script, "script_give_center_to_faction_aux", ":cur_village", ":town_faction"),
(try_end), |
|