宗教模組製作

本頁面所適用的版本可能已經過時,最後更新於1.0

使用遊戲提供的高度模塊化設計,很容易在遊戲中添加新宗教。

宗教組[編輯 | 編輯原始碼]

每個宗教屬於一個宗教組。三個原版宗教組是亞伯拉罕宗教組、東方宗教組和原始宗教組。例如:

  • 基督教和伊斯蘭教屬於亞伯拉罕宗教組
  • 斯拉夫原始宗教和原始宗教屬於原始宗教組

宗教組位於/common/religion/religion_families。宗教組使用帶有字母數字ID的標籤定義。舉例,亞伯拉罕宗教組定義如下:

rf_abrahamic = {
	graphical_faith = "orthodox_gfx"
	hostility_doctrine = abrahamic_hostility_doctrine
	doctrine_background_icon = core_tenet_banner_christian.dds
}

下表是設置宗教組時可以使用的所有參數。

屬性 類型 描述 舉例
name localization key 如果沒有設置,則將對象的鍵值作為本地化鍵值。 name = name_of_the_family
is_pagan boolean 指定該組是否為原始宗教(默認值是yes)。 is_pagan = no
graphical_faith gfx 該宗教組內的所有宗教默認為此3D模型(目前用於神殿地產)。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 graphical_faith = catholic_gfx
piety_icon_group gfx 該宗教組內的所有宗教默認為此組虔誠圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 piety_icon_group = christian
doctrine_background_icon gfx 該宗教組內的所有宗教默認為此教義背景圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 doctrine_background_icon = core_tenet_banner_christian.dds
hostility_doctrine doctrine INTERFACE ONLY:Use this doctrine when displaying hostility information for the whole religious family (if not scripted, then show no information) hostility_doctrine = christian_hostility_doctrine

宗教結構[編輯 | 編輯原始碼]

宗教位於/common/religion/religions文件夾。每個宗教使用一個文件定義,並且屬於該宗教的信仰也在其中定義。宗教使用帶有字母數字ID的標籤定義。下面是一個虛構宗教的例子(本地化和信仰將在下文討論):

sea_cults = {
	family = rf_pagan
	graphical_faith = pagan_gfx
	
	doctrine = pagan_hostility_doctrine
	
	pagan_roots = yes
	
	#Main Group
	doctrine = doctrine_spiritual_head
	doctrine = doctrine_gender_male_dominated
	doctrine = doctrine_pluralism_fundamentalist
	doctrine = doctrine_theocracy_lay_clergy

	#Marriage
	doctrine = doctrine_concubines
	doctrine = doctrine_divorce_allowed
	doctrine = doctrine_bastardry_legitimization
	doctrine = doctrine_consanguinity_cousins

	#Crimes
	doctrine = doctrine_homosexuality_shunned
	doctrine = doctrine_adultery_men_shunned
	doctrine = doctrine_adultery_women_accepted
	doctrine = doctrine_kinslaying_accepted
	doctrine = doctrine_deviancy_accepted
	doctrine = doctrine_witchcraft_crime

	#Clerical Functions
	doctrine = doctrine_clerical_function_taxation
	doctrine = doctrine_clerical_gender_either
	doctrine = doctrine_clerical_marriage_allowed
	doctrine = doctrine_clerical_succession_spiritual_appointment

	traits = {
		virtues = { brave lunatic_1 wrathful }
		sins = { patient content shy }
	}

	reserved_male_names = {
		Lobbo Lobbeu Lobst Lob Lobr Loabstr Lobb Lub Leurbo
	}
	reserved_female_names = {
		Lobba Lobbelia Lobsta Loba Lober Loabstra Lobba Lubas Leurbos
	}
	holy_order_names = {
		{ name = "holy_order_claw_bearers" }
		{ name = "holy_order_clackers" }
		{ name = "holy_order_servants_of_the_lobbo" }
		{ name = "holy_order_the_pile" }
	}
	holy_order_maa = { huscarl }
	custom_faith_icons = { custom_faith_1 custom_faith_2 custom_faith_3 custom_faith_4 custom_faith_5 custom_faith_6 custom_faith_7 custom_faith_8 custom_faith_9 custom_faith_10 lobbist lobbist_reformed }

	localization = {
		...
	}

	faiths = {
		...
	}
}

下表是設置宗教時可以使用的所有參數。

屬性 類型 描述 舉例
family religion family 宗教所屬的宗教組。 family = family_name
graphical_faith gfx 該宗教組內的所有信仰默認為此3D模型(目前用於神殿地產)。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 graphical_faith = catholic_gfx
piety_icon_group gfx 該宗教組內的所有信仰默認為此組虔誠圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 piety_icon_group = christian
doctrine_background_icon image file 該宗教組內的所有信仰默認為此教義背景圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 doctrine_background_icon = core_tenet_banner_christian.dds
pagan_roots boolean If yes, then faiths without the unreformed doctrine are considered reformed by the interface. pagan_roots = yes
doctrine doctrine 在宗教內定義的教義將應用於其中的所有信仰。這只是在遊戲開局時;這純粹是為了方便寫腳本,相當於把教義放在所有信仰內。在具體的信仰內定義不同的教義可以覆蓋它。Note that doctrines that allow more than one pick can not be defined on a religion level, as there's no obvious override system that would work then. 教義不能在信仰部分之後定義。 doctrine = doctrine_spiritual_head
traits clause 定義哪些特質被認為是美德和罪惡。Notes on virtues and sins: List traits that are virtues for all followers. Trait groups also work. If more than one trait in a group is defined (or the group itself), only the first will be shown in the UI

sins = { ... } # (sins) # Virtues and sins give an opinion bonus/penalty (see VIRTUOUS_TRAIT and SINFUL_TRAIT defines). For that it is the "viewer's" faith that matters. # E.g. if generous is a christian virtue, all christian characters will think more highly of all others with that trait, even if the others are not christian. # Holders of the traits will also get the virtue_owner_modifier/sin_owner_modifier for each matching trait. # Virtues and sins can optionally have a multiplier to scale the effects (default is 1): virtues = { brave = 0.5 } # scales both the opinion effect and the modifier # And they can specify a custom modifier (default is virtue_owner_modifier/sin_owner_modifier): sins = { stubborn = { monthly_prestige = -0.1 } } # When using a custom modifier you can specify a scale as well (default is 1): sins = { stubborn = { monthly_prestige = -0.1 scale = 2 } } # scales both the opinion effect and the modifier

virtues = { brave generous } sins = { stubborn = { monthly_prestige = -0.1 scale = 2 } }
reserved_male_names list<string> 在此處列出的名稱應用於所有沒有定義 reserved_male_names的信仰。新生男童選擇基於宗教的名稱時可以選擇這些名稱。 reserved_male_names = { Rodrigo Johan Paradoxus }
reserved_female_names list<string> reserved_male_names一樣,只是應用於女性角色。
custom_faith_icons list<gfx> 創建自定義信仰時,這些是可用的圖標。gfx/interface/icons/religion/%s.dds,其中 %s 是名稱。Also needs a text icon custom_faith_icons = { custom_faith_1 custom_faith_2 custom_faith_3 }
localization list<localization keys> See localization inside faiths below.
holy_order_names list<clause> 該宗教的騎士團可以使用的名稱和盾徽。These are used if there are none available for the faith. If there are none left here, it uses "holy_order_default" as name and a randomly generated CoA instead.
holy_order_names = {
		{ name = "holy_order_name1" coat_of_arms = "holy_order_coa1" }
		{ name = "holy_order_name2" coat_of_arms = "holy_order_coa2" }
		...
	}
holy_order_maa list<regiment type> Men-At-Arms types mostly used for holy orders. The culture of the headquarters of the holy order must have unlocked the required innovation. (It will use the last available type in the list.) holy_order_maa = { huscarl }
faiths list<Faiths> 見下文

信仰[編輯 | 編輯原始碼]

Faiths are defined within the faith clause of a religion. They can overwrite default doctrines and graphics set for the whole religion. Here is an example of a fictional faith within the religion defined above.

faiths = {
	lobbist = {
		color = { 0.2 0.2 0.9 }
		icon = lobbist
		reformed_icon = lobbist_reformed
		holy_site = uppsala
		holy_site = lejre
		holy_site = paderborn
		holy_site = zeeland
		holy_site = ranaheim

		doctrine = unreformed_faith_doctrine
		doctrine = tenet_warmonger
		doctrine = tenet_human_sacrifice
		doctrine = tenet_ancestor_worship
			
	}
}

Below is a list of all parameters that can be set for faiths.

Attribute Type Description Example
color rgb color = { 0.2 0.2 0.9 }
icon gfx 如果你想要使用其他信仰圖標。 icon = bosnian_church
graphical_faith gfx 該信仰(以及基於該信仰的自定義信仰)使用此3D模型(目前用於神殿地產)。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 graphical_faith = catholic_gfx
piety_icon_group gfx 該信仰(以及基於該信仰的自定義信仰)使用此組虔誠圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。 piety_icon_group = christian
doctrine_background_icon gfx 該信仰(以及基於該信仰的自定義信仰)使用此教義背景圖標。優先順序是從最低級開始:信仰 > 宗教 > 宗教組。
religious_head title 信仰領袖應該持有的頭銜。如果沒有設置,將不會擁有信仰領袖(除非在腳本的其他地方創建) religious_head = d_coptic_papacy
holy_site holy site 聖地,在holy_site文件夾中定義。你可以添加任意數量的聖地。 holy_site = jerusalem
doctrine doctrine
reserved_male_names/reserved_female_names list<string>
localization

本地化[編輯 | 編輯原始碼]

The localization clause in both faiths and religions provides key-value pairs for localization. However, this clause does not include object localization for the religion/faith itself and its basic properties. The following localization keys also need defining:

  • <religion/faith_name>
  • <religion/faith_name>_adj
  • <religion/faith_name>_adherent
  • <religion/faith_name>_adherent_plural
  • <religion/faith_name>_desc

Below is a list of keys that need to be paired for localization. Although you can use this as a reference, it is also possible to simply copy and paste this list from a vanilla file and add your own keys where needed. Although many items in the list are not relevant to many religions/faiths, they can simply be assigned to a key used by another more relevant item. (e.g. FertilityGodName in Christianity is given as "$christianity_high_god_name$" in the localization file):

  • HighGodName
  • HighGodNamePossessive
  • HighGodNameSheHe
  • HighGodHerselfHimself
  • HighGodHerHis
  • HighGodNameAlternate
  • HighGodNameAlternatePossessive
  • CreatorName
  • CreatorNamePossessive
  • CreatorSheHe
  • CreatorHerHis
  • CreatorHerHim
  • HealthGodName
  • HealthGodNamePossessive
  • HealthGodSheHe
  • HealthGodHerHis
  • HealthGodHerHim
  • FertilityGodName
  • FertilityGodNamePossessive
  • FertilityGodSheHe
  • FertilityGodHerHis
  • FertilityGodHerHim
  • WealthGodName
  • WealthGodNamePossessive
  • WealthGodSheHe
  • WealthGodHerHis
  • WealthGodHerHim
  • HouseholdGodName
  • HouseholdGodNamePossessive
  • HouseholdGodSheHe
  • HouseholdGodHerHis
  • HouseholdGodHerHim
  • FateGodName
  • FateGodNamePossessive
  • FateGodSheHe
  • FateGodHerHis
  • FateGodHerHim
  • KnowledgeGodName
  • KnowledgeGodNamePossessive
  • KnowledgeGodSheHe
  • KnowledgeGodHerHis
  • KnowledgeGodHerHim
  • WarGodName
  • WarGodNamePossessive
  • WarGodSheHe
  • WarGodHerHis
  • WarGodHerHim
  • TricksterGodName
  • TricksterGodNamePossessive
  • TricksterGodSheHe
  • TricksterGodHerHis
  • TricksterGodHerHim
  • NightGodName
  • NightGodNamePossessive
  • NightGodSheHe
  • NightGodHerHis
  • NightGodHerHim
  • WaterGodName
  • WaterGodNamePossessive
  • WaterGodSheHe
  • WaterGodHerHis
  • WaterGodHerHim
  • PantheonTerm
  • PantheonTermHasHave
  • GoodGodNames (list)
  • DevilName
  • DevilNamePossessive
  • DevilSheHe
  • DevilHerHis
  • DevilHerselfHimself
  • EvilGodNames (list)
  • HouseOfWorship
  • HouseOfWorshipPlural
  • ReligiousSymbol
  • ReligiousText
  • ReligiousHeadName
  • ReligiousHeadTitleName
  • DevoteeMale
  • DevoteeMalePlural
  • DevoteeFemalePlural
  • DevoteeNeuter
  • DevoteeNeuterPlural
  • PriestMale
  • PriestMalePlural
  • PriestFemale
  • PriestFemalePlural
  • PriestNeuter
  • PriestNeuterPlural
  • AltPriestTermPlural
  • BishopMale
  • BishopMalePlural
  • BishopFemale
  • BishopFemalePlural
  • BishopNeuter
  • BishopNeuterPlural
  • DivineRealm
  • PositiveAfterLife
  • NegativeAfterLife
  • DeathDeityName
  • DeathDeityNamePossessive
  • DeathDeitySheHe
  • DeathDeityHerHis
  • WitchGodName
  • WitchGodHerHis
  • WitchGodSheHe
  • WitchGodHerHim
  • WitchGodMistressMaster
  • WitchGodMotherFather
  • GHWName
  • GHWNamePlural

圖像[編輯 | 編輯原始碼]

創建宗教和信仰時不要求圖像模組製作,因為原版遊戲內有大量的圖標,要麼用於其他宗教,要麼留給自定義信仰。但是,如果你感覺原版中沒有適合你的宗教的圖標,也可以輕易地添加新圖標。在路徑/gfx/interface/icons/religion,創建一個新的 100x100 dds文件。文件名稱是在宗教文件中引用該圖標的方式。(例如icon = lobbist將引用/gfx/interface/icons/religion/lobbist.dds)。

聖地[編輯 | 編輯原始碼]

另見:聖地 ID

Custom holy sites can be added in a text document in the /common/religion/holy_sites folder. Each site is identified by a name, and contains information on the location of the site and the benefits (or potentially negatives) it brings.

jerusalem = {
	county = c_jerusalem
	
	character_modifier = {
		monthly_piety_gain_mult = 0.2
	}
	flag = jerusalem_conversion_bonus # +20% County Conversion
}

下面是可以分配給聖地的屬性。只有伯爵領是必要的。

屬性 類型 描述 舉例
county title 聖地所在的伯爵領。 county = c_jerusalem
barony title 聖地所在的男爵領。 barony = b_vaticano
character modifier modifier 當該聖地的持有者信奉對應信仰時,這個修正應用於所有該信仰的角色 character_modifier = {

monthly_piety_gain_mult = 0.2 }

flag flag flag = jerusalem_conversion_bonus

聖地也需要以下本地化鍵值:

  • holy_site_<name>_name
  • holy_site_<name>_effect_name
  • holy_site_<name>_effects
 holy_site_jerusalem_name:0 "Jerusalem"
 holy_site_jerusalem_effect_name:0 "From [holy_site|E] #weak ($holy_site_jerusalem_name$)#!"
 holy_site_jerusalem_effects:0 "County Conversion Speed: #P +20%#!"


核心教義ID[編輯 | 編輯原始碼]

每個核心教義在遊戲文件中有一個內部ID用於引用。一般,核心教義的ID來自於它的名稱:

  1. 使用默認的非變體名稱(即,不是特定信仰使用的異名)
  2. 將所有大寫字母轉為小寫(A...Z->a...z
  3. 將所有空格( )替換為下劃線(_
  4. 在名稱前添加tenet_

不滿足上述方式的核心教義ID列於下表:

名稱 核心教義 ID
生而興旺 tenet_mystical_birthright
神慰聖事 tenet_consolamentum
教權制 tenet_pentarchy
宗教法 tenet_religious_legal_pronouncements
聖誑 tenet_sacred_shadows
認可假意改信 tenet_false_conversion_sanction
鬥爭與順服 tenet_struggle_submission
調和信仰的民間傳統 tenet_unreformed_syncretism