本帖最后由 在那悠远的苍穹 于 2020-12-29 20:04 编辑
一个简易的宗教系统,供各位骑友参考。以战团为例,我给6个国家配了5个宗教,分别是天主教、泛灵信仰、长生天、多神教、伊斯兰教。斯瓦迪亚和罗多克都是天主教。
一共三点:
1、国家宗教
2、省份宗教
3、宗教修正
通过这个我们可以举一反三添加更多的因素,比如异端容忍、宗教转化等等,还可以跟科技、军队挂钩,反正P社游戏里有大把东西可以加的(笑。
我提供个参考,具体怎么用就看各位骑友的想象力了。
# bore
slot_faction_religion = 100
slot_party_religion = 101
slot_party_modifier = 102
Catholic = 1
Animism = 2
Tengri_pagan = 3
Polytheism = 4
Islam = 6
tariffs_modifier = 1
wealth_modifier = 2
prosperity_modifier = 3
# bore
|
先在game_start中加入:
(call_script, "script_initialize_faction_religion"),# religion bore
在scripts最底部加入,分配各国的宗教:
# bore religion
# script_initialize_faction_religion
("initialize_faction_religion",
[
(assign, ":religion", 0),
(try_for_range, ":faction_no", npc_kingdoms_begin, npc_kingdoms_end),
(faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
(try_begin),
(this_or_next|eq, ":faction_no", "fac_kingdom_1"),
(eq, ":faction_no", "fac_kingdom_5"),
(assign, ":religion", Catholic),
(else_try),
(eq, ":faction_no", "fac_kingdom_2"),
(assign, ":religion", Animism),
(else_try),
(eq, ":faction_no", "fac_kingdom_3"),
(assign, ":religion", Tengri_pagan),
(else_try),
(eq, ":faction_no", "fac_kingdom_4"),
(assign, ":religion", Polytheism),
(else_try),
(eq, ":faction_no", "fac_kingdom_6"),
(assign, ":religion", Islam),
(try_end),
(faction_set_slot, ":faction_no", slot_faction_religion, ":religion"),
(try_end),
]),
# bore religion
然后搜索(str_store_string, s21, "str_foreign_relations__"),
在下面加上:
# bore
(str_clear,s22),
(faction_get_slot, ":religion", ":faction_no", slot_faction_religion),
(try_begin),
(eq,":religion", Catholic),
(str_store_string, s22, "str_catholic"),
(else_try),
(eq,":religion", Animism),
(str_store_string, s22, "str_animism"),
(else_try),
(eq,":religion", Tengri_pagan),
(str_store_string, s22, "str_tengri_pagan"),
(else_try),
(eq,":religion", Polytheism),
(str_store_string, s22, "str_polytheism"),
(else_try),
(eq,":religion", Islam),
(str_store_string, s22, "str_islam"),
(try_end),
# bore
|
# 这一段我原想加在scripts里,但不知为何加在哪里不管用。
# bore 分配各省份宗教
(0,
[
(try_begin),
(eq, "$religion_x", 0),
(assign, ":cur_religion", 0),
(try_for_range, ":center_no", towns_begin, villages_end),
(store_faction_of_party, ":party_faction", ":center_no"),
(try_begin),
(this_or_next|eq, ":party_faction", "fac_kingdom_1"),
(eq, ":party_faction", "fac_kingdom_5"),
(assign, ":cur_religion", Catholic),
(else_try),
(eq, ":party_faction", "fac_kingdom_2"),
(assign, ":cur_religion", Animism),
(else_try),
(eq, ":party_faction", "fac_kingdom_3"),
(assign, ":cur_religion", Tengri_pagan),
(else_try),
(eq, ":party_faction", "fac_kingdom_4"),
(assign, ":cur_religion", Polytheism),
(else_try),
(eq, ":party_faction", "fac_kingdom_6"),
(assign, ":cur_religion", Islam),
(try_end),
(party_set_slot, ":center_no", slot_party_religion, ":cur_religion"),
(assign, "$religion_x", 1),
(try_end),
(try_end),
]),
# 这个是给party分配宗教修正的。
(0,
[
(assign, ":religion_name", 0),
(assign, ":modifier", 0),
(try_for_range, ":center_no", towns_begin, villages_end),
(party_get_slot, ":religion", ":center_no", slot_party_religion),
(try_begin),
(eq, ":religion", Catholic),
(assign, ":religion_name", "str_catholic"),
(assign, ":modifier", tariffs_modifier),
(else_try),
(eq, ":religion", Animism),
(assign, ":religion_name", "str_animism"),
(assign, ":modifier", wealth_modifier),
(else_try),
(eq, ":religion", Tengri_pagan),
(assign, ":religion_name", "str_tengri_pagan"),
(assign, ":modifier", wealth_modifier),
(else_try),
(eq, ":religion", Polytheism),
(assign, ":religion_name", "str_polytheism"),
(assign, ":modifier", prosperity_modifier),
(else_try),
(eq, ":religion", Islam),
(assign, ":religion_name", "str_islam"),
(assign, ":modifier", tariffs_modifier),
(try_end),
(party_set_extra_text, ":center_no", ":religion_name"),
(party_set_slot, ":center_no", slot_party_modifier, ":modifier"),
(try_end),
]),
# 宗教修正的效果,我加了三种、分别是关税、中心财富、繁荣度。每25天触发一次。
(24*25,
[
(assign, ":tariffs_add", 0),
(assign, ":wealth_add", 0),
(assign, ":prosperity_add", 0),
(try_for_range, ":center_no", towns_begin, villages_end),
(party_get_slot, ":modifier", ":center_no", slot_party_modifier),
(try_begin),
(eq, ":modifier", tariffs_modifier),
(val_add, ":tariffs_add", 50),
(else_try),
(eq, ":modifier", wealth_modifier),
(val_add, ":wealth_add", 500),
(else_try),
(eq, ":modifier", prosperity_modifier),
(val_add, ":prosperity_add", 1),
(try_end),
(party_set_slot, ":center_no", slot_center_accumulated_tariffs, ":tariffs_add"),
(party_set_slot, ":center_no", slot_town_wealth, ":wealth_add"),
(party_set_slot, ":center_no", slot_town_prosperity, ":prosperity_add"),
(try_end),
]),
|
# bore
# religion
("catholic", "Catholic"),
("animism", "Animism"),
("tengri_pagan", "Tengri_pagan"),
("polytheism", "Polytheism"),
("islam", "Islam"),
# modifier
("tariffs_modifier", "tariffs modifier"),
("wealth_modifier", "wealth_modifier"),
("prosperity_modifier", "prosperity modifier"),
# bore
|
搜索:"town",mnf_enable_hot_keys|mnf_scale_picture 添加红色部分。
"town",mnf_enable_hot_keys|mnf_scale_picture,
"{s10} {s14}^{s11}{s12}{s13}^^^{s20}",
"none",
[
# bore
(try_begin),
(party_get_slot, ":party_modifier", "$current_town", slot_party_modifier),
(gt, ":party_modifier", -1),
(try_begin),
(eq, ":party_modifier", tariffs_modifier),
(str_store_string, s20, "str_tariffs_modifier"),
(else_try),
(eq, ":party_modifier", wealth_modifier),
(str_store_string, s20, "str_wealth_modifier"),
(else_try),
(eq, ":party_modifier", prosperity_modifier),
(str_store_string, s20, "str_prosperity_modifier"),
(try_end),
(try_end),
# bore
|
最后汉化部分。
game_menus.csv 查找并添加红色部分
menu_town|{s10}{s14}^{s11}{s12}{s13}^^^{s20}
game_strings.csv 查找并添加红色部分
str_foreign_relations__|宗 教 :{s22} ^^外 交 关 系 : ^
在最后加上:
str_catholic|天 主 教
str_animism|泛 灵 信 仰
str_tengri_pagan|长 生 天
str_polytheism|诺 斯 多 神 教
str_islam|伊 斯 兰 教
str_tariffs_modifier|关 税 修 正 ( 增 加 中 心 关 税 )
str_wealth_modifier|金 钱 修 正( 增 加 中 心 财 富 )
str_prosperity_modifier|繁 荣 度 修 正 ( 增 加 中 心 繁 荣 度 )
|
希望没有漏掉什么……
|