头衔模组制作:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.1
(merge from offical wiki)
 
70讨论 | 贡献
 
(未显示2个用户的9个中间版本)
第1行: 第1行:
Titles are defined in the ''/common/landed_titles/'' folder
{{version|1.1}}{{需要翻译}}
{{expand|with=examples}}
头衔在<code>/common/landed_titles/</code>文件夹中定义。


==Basic Titular Title==
== 基础名誉头衔==
A simple titular title can be created with very little difficulty. The title prefix defines the tier.
创建一个简单的名誉头衔毫无困难。头衔前缀定义了其等级。


{|class="wikitable sortable"
{|class="wikitable sortable"
!Prefix
! 前缀
!Tier
! 等级
|-
|-
|b_
|b_
|Barony (cannot be titular)
| 男爵领(不能是名誉头衔)
|-
|-
|c_
|c_
|County
| 伯爵领
|-
|-
|d_
|d_
|Duchy
| 公国
|-
|-
|k_
|k_
|Kingdom
| 王国
|-
|-
|e_
|e_
|Empire
| 帝国
|-
|-
|}
|}


Decide on a name for the title, which is to be added on to the prefix. Then, you must select a color. Colors are defined in RGB. The title can take two color modifiers color and color2, which is optional. The color2 modifier changes the secondary color of your border.:
决定好头衔的名称和前缀。之后,你必须选择一种以RGB定义的颜色。头衔可以有两种颜色修正color和color2(可选)。color2修正改变边界的次要颜色:
<pre>
<pre>
k_titular_kingdom_name = {
k_titular_kingdom_name = {
第31行: 第33行:
}
}
</pre>
</pre>
This is the bare minimum required to create a title, and it can now be granted through the console. However, it will lack localization, meaning that it will appear as "k_titular_kingdom_name" in-game.
这是创建头衔的最低要求,现在可以直接通过控制台被授予。然而,它将缺少本地化,也就是在游戏中它将显示为“k_titular_kingdom_name”。


==Localization==
== 本地化==
A title requires two localization keys to be defined.
一个头衔要求定义两个本地化键值。


* <title_name>
* <title_name>
* <title_name>_adj
* <title_name>_adj


Vanilla title localization can be found in ''/localization/<language>/titles_l_<language>.yml''.
此外,一个头衔可以拥有独特的冠词。例如拜占庭是 'the' Byzantine Empire。
* <title_name>_article


==Coat of Arms==
原版头衔本地化位于<code>/localization/<language>/titles_l_<language>.yml</code>。
[[Coat of arms modding|Coat of Arms modding]]
 
==List of attributes==
== 盾徽==
Below is a list of attributes that can be applied to a title.
{{see also|Coat of arms modding}}
 
== 属性列表==
下表是可以用于头衔的属性。


{|class="wikitable sortable"
{|class="wikitable sortable"
!Attribute
! 属性
!Type
! 类型
!Description
! 描述
!Example
! 举例
|-
|-
|color
|color
|rgb
|rgb
|The color of the title displayed on the map
| 头衔在地图上显示时的颜色
|color = { 100 255 200 }
|color = { 100 255 200 }
|-
|-
|color2
|color2
|rgb
|rgb
|Changes the secondary color of your border
| 改变你的边界的次要颜色
|color2 = { 150 240 200 }
|color2 = { 150 240 200 }
|-
|-
|definite_form
|definite_form
|boolean
|boolean
|
| 如果设置为yes,头衔的前缀(例如“Kingdom of”或“Duchy of”)将不会使用。这通常用于头衔名称已经包含了头衔类型的情况,以避免出现如“Empire of the Byzantine Empire”的情况。
|definite_form = yes
|definite_form = yes
|-
|-
第74行: 第80行:
|landless
|landless
|boolean
|boolean
|If yes, the title will always exist once it has been made. This allows, for example, religious heads to continue to exist even when unlanded.
| 如果设置为yes,头衔在被创建后将总是存在。这将允许如信仰领袖等头衔没有领地也可以存在。
|landless = yes
|landless = yes
|-
|-
|capital
|capital
|title
|title
|The preferred (de jure?) capital of the title
| 头衔的首选{{sup|{{red|法理?}}}}首都
|capital = c_roma
|capital = c_roma
|-
|-
|ai_primary_priority
|ai_primary_priority
|clause
|clause
|Determines how likely AI is to make this title their primary title. Conditions can be used to alter the primary score.
| 定义AI有多大可能将这个头衔设置为主头衔。条件可以用于修改主要分数。
|ai_primary_priority = {
|
<pre>
ai_primary_priority = {
if = {
if = {
limit = {
limit = {
第100行: 第108行:
}
}
}
}
</pre>
|-
|-
|destroy_if_invalid_heir
|destroy_if_invalid_heir
|
|
|Destroys the title if the heir (having just inherited the title?) is invalid. (To prevent a character of the wrong religion holding a religious head title, for example)
| 如果继承人( 刚刚继承了头衔?) 是无效的,则会摧毁头衔。( 例如,为了防止一个错误宗教的角色持有宗教领袖头衔)
|destroy_if_invalid_heir = yes
|destroy_if_invalid_heir = yes
|-
|-
第113行: 第122行:
|always_follows_primary_heir
|always_follows_primary_heir
|boolean
|boolean
|The title will always go to the holder's primary heir
| 头衔总是将分配给持有者的第一继承人
|always_follows_primary_heir = yes
|always_follows_primary_heir = yes
|-
|-
|de_jure_drift_disabled
|de_jure_drift_disabled
|boolean
|boolean
|Prevents the title from de jure drifting into a kingdom or empire
| 阻止头衔在法理转移给一个王国或帝国
|de_jure_drift_disabled = yes
|de_jure_drift_disabled = yes
|-
|-
|male_names/female_names
|male_names/female_names
|list<string>
|list<string>
|A list of names that can be adopted by the title holder. For example, this allows the Pope to gain a Papal name upon his election.
| 头衔持有者可以采用的名称列表。例如,教宗在被选上后会获得一个教宗名。
|male_names = { Alexander Anastasius Benedictus Caelestinus Callistus Clemens Eugenius Leo Gregorius Hadrianus Honorius Innocentius Ioannes Lucius Marinus Martinus Nicolaus Sergius Silvester Stephanus Urbanus Victor }
|male_names = { Alexander Anastasius Benedictus Caelestinus Callistus Clemens Eugenius Leo Gregorius Hadrianus Honorius Innocentius Ioannes Lucius Marinus Martinus Nicolaus Sergius Silvester Stephanus Urbanus Victor }
|-
|-
|cultural_names
|cultural_names
|clause
|clause
|If the title is held by somebody with culture X, the title name will use the Y localization key and the adjective will use Y_adj
| 如果头衔被属于文化X的某人持有,头衔名称将使用本地化键值Y,形容词使用Y_adj
|cultural_names = {X = Y}
|cultural_names = {X = Y}
|-
|-
|province
|province
|ID
|ID
|The province ID of a barony
| 男爵领使用的省份ID
|province = 3699
|province = 3699
|-
|-
|}
|}
==公国首都建筑==
To locate the duchy capital building in the defined de jure duchy capital, list the capital as the first county defined under the duchy title. The special duchy building is placed in the first listed barony of the first listed county, even if a different county is defined as the capital.
<br>
<br>
{{Modding navbox}}
{{Modding navbox}}
[[Category:Modding]]
[[Category: 模组制作]]
[[en:Title modding]]

2022年11月1日 (二) 22:44的最新版本

头衔在/common/landed_titles/文件夹中定义。

基础名誉头衔[编辑 | 编辑源代码]

创建一个简单的名誉头衔毫无困难。头衔前缀定义了其等级。

前缀 等级
b_ 男爵领(不能是名誉头衔)
c_ 伯爵领
d_ 公国
k_ 王国
e_ 帝国

决定好头衔的名称和前缀。之后,你必须选择一种以RGB定义的颜色。头衔可以有两种颜色修正color和color2(可选)。color2修正改变边界的次要颜色:

k_titular_kingdom_name = {
	color = { 100 255 200 }
}

这是创建头衔的最低要求,现在可以直接通过控制台被授予。然而,它将缺少本地化,也就是在游戏中它将显示为“k_titular_kingdom_name”。

本地化[编辑 | 编辑源代码]

一个头衔要求定义两个本地化键值。

  • <title_name>
  • <title_name>_adj

此外,一个头衔可以拥有独特的冠词。例如拜占庭是 'the' Byzantine Empire。

  • <title_name>_article

原版头衔本地化位于/localization/<language>/titles_l_<language>.yml

盾徽[编辑 | 编辑源代码]

属性列表[编辑 | 编辑源代码]

下表是可以用于头衔的属性。

属性 类型 描述 举例
color rgb 头衔在地图上显示时的颜色 color = { 100 255 200 }
color2 rgb 改变你的边界的次要颜色 color2 = { 150 240 200 }
definite_form boolean 如果设置为yes,头衔的前缀(例如“Kingdom of”或“Duchy of”)将不会使用。这通常用于头衔名称已经包含了头衔类型的情况,以避免出现如“Empire of the Byzantine Empire”的情况。 definite_form = yes
ruler_uses_title_name boolean ruler_uses_title_name = no
landless boolean 如果设置为yes,头衔在被创建后将总是存在。这将允许如信仰领袖等头衔没有领地也可以存在。 landless = yes
capital title 头衔的首选[ 法理?]首都 capital = c_roma
ai_primary_priority clause 定义AI有多大可能将这个头衔设置为主头衔。条件可以用于修改主要分数。
ai_primary_priority = {
			if = {
				limit = {
					culture = culture:greek
				}
				add = @correct_culture_primary_score
			}
			if = {
				limit = {
					NOT = { culture = culture:greek }
					culture_group = culture_group:byzantine_group
				}
				add = @better_than_the_alternatives_score
			}
		}
destroy_if_invalid_heir 如果继承人(刚刚继承了头衔?)是无效的,则会摧毁头衔。(例如,为了防止一个错误宗教的角色持有宗教领袖头衔) destroy_if_invalid_heir = yes
no_automatic_claims boolean no_automatic_claims = yes
always_follows_primary_heir boolean 头衔总是将分配给持有者的第一继承人 always_follows_primary_heir = yes
de_jure_drift_disabled boolean 阻止头衔在法理转移给一个王国或帝国 de_jure_drift_disabled = yes
male_names/female_names list<string> 头衔持有者可以采用的名称列表。例如,教宗在被选上后会获得一个教宗名。 male_names = { Alexander Anastasius Benedictus Caelestinus Callistus Clemens Eugenius Leo Gregorius Hadrianus Honorius Innocentius Ioannes Lucius Marinus Martinus Nicolaus Sergius Silvester Stephanus Urbanus Victor }
cultural_names clause 如果头衔被属于文化X的某人持有,头衔名称将使用本地化键值Y,形容词使用Y_adj cultural_names = {X = Y}
province ID 男爵领使用的省份ID province = 3699

公国首都建筑[编辑 | 编辑源代码]

To locate the duchy capital building in the defined de jure duchy capital, list the capital as the first county defined under the duchy title. The special duchy building is placed in the first listed barony of the first listed county, even if a different county is defined as the capital.