预制角色被定义在 /history/characters 文件夹的文件里。
预制角色文件具有以下基本结构:
<char_ID> = {
#角色属性
name = "John"
dynasty = <dynasty_ID>
religion = <religion>
culture = <culture>
father = <char_ID>
mother = <char_ID>
#角色历史
<yyyy.mm.dd> = {
birth = yes
}
<yyyy.mm.dd> = {
death = yes
}
}
例如:
122 = {
name="Harold" #哈罗德.戈德温,英格兰的国王
dynasty=756
dna="medjejoencc"
properties="ae00e0"
martial=8
diplomacy=6
intrigue=5
stewardship=6
religion="catholic"
culture="saxon"
add_trait="arbitrary"
add_trait="proud"
add_trait="skilled_tactician"
father=120
mother=101534
1025.1.2={
birth=yes
}
1048.1.1={
add_spouse=131 #Ealdgyth 'Swanneck'
}
1064.1.1={
remove_spouse = 131
}
1065.6.6={
add_spouse=123 #Ealdgyth of Mercia
}
1066.9.14 = {
raise_levies = {
location = 62 # Leicester
force_mult = 2.5
}
}
1066.10.14={
raise_levies = {
dismiss = yes
location = 62 # Leicester
force_mult = 2.5
}
death = {
death_reason = death_battle
killer = 140
}
}
}
以下属性可用于定义角色:
| 属性 | 类型 | 描述 | 示例 |
|---|---|---|---|
| name | string | 角色的名称,因为它将出现在游戏中。不是本地化键 | name = "Harold" |
| female | bool | 角色性别 | female = yes |
| dynasty | dynastyID | 该角色的王朝,使用对应于 Dynasty modding 档案。如果你想创建一个随机王朝,只需写成 dynasty=random;如果你想在事件中更改为新的王朝,则
can write dynasty=father_bastard
Warning: dynasty=none doesn't work anymore.[1][2] Use the |
dynasty = 756 1000.1.1= { birth=yes effect= { dynasty=none } } |
| father | charID | Father of the character, using a unique numerical ID | father = 120 |
| real_father | charID | Not used in vanilla | real_father = 121 |
| mother | charID | Mother of the character, using a unique numerical ID | mother = 101534 |
| dna | string | 一个11位数字的字母数字代码,用于游戏引擎的基因和继承系统,定义角色的外观。参见 Portrait modding | dna = "medjejoencc" |
| properties | string | 一个6位或11位的字母数字代码,定义角色的服装和头饰 etc. See Portrait modding | properties = "ae00e0" properties = "aj00bb00000" |
| martial | integer | Base martial skill of the character | martial = 8 |
| diplomacy | integer | Base diplomacy skill of the character | diplomacy = 6 |
| intrigue | integer | Base intrigue skill of the character | intrigue = 5 |
| stewardship | integer | Defines the base stewardship skill of the character | stewardship = 6 |
| learning | integer | Base learning skill of the character | learning = 4 |
| health | integer | Base health of the character | health = 7 |
| fertility | float | Base fertility of the character | fertility = 0.8 |
| religion | religion | Character's religion, using an ID from the religion files | religion = "catholic" |
| secret_religion | religion | Character's secret religion, using an ID from the religion files | secret_religion = "bon" |
| culture | culture | Character's culture, using an ID from the culture files | culture = "saxon" |
| race | culture | Character's "race", using an ID from the culture files. The character's graphical culture and appearance will use the culturegfx 被分配到那个文化中。用于与其成长文化不同族裔的角色(例如收养),未用于原版版本。
|
race = "mongol" |
| trait / add_trait | trait | 通过 traits 文件。没有特质的角色会在游戏开始时随机分配几个特质。 | trait = "skilled_tactician" |
| disallow_random_traits | bool | 防止游戏随机赋予角色额外特质,除非通过后续事件 | disallow_random_traits = yes |
| occluded | bool | See Portrait modding | occluded = yes |
| historical | bool | 标记该角色为重要,确保他们永远不会从数据库中被修剪[3] | historical = yes |
| easter_egg | bool | 防止角色在游戏开始时被分配到某个社会 | easter_egg = yes |
角色生活中的重要事件——如出生、结婚和配偶结婚——被定义为按年份和日期的组标签。CKII使用当 year.month.day 格式,因此874年1月3日出生的人物定义如下:
874.1.3 = {
birth = yes
}
组标签定义事件日期,组标签内的旗帜既说明事件内容,也仅显示出生和死亡日期。日期不匹配不会致命,但在游戏中可能会让人混淆。
每个带有字符定义的组标签日期可以包含一些历史命令。
注意:如果没有专用的历史命令,可以执行字符作用域 command via the general purpose effect clause.
| Attribute | Type | Description | Example |
|---|---|---|---|
| birth | yes/date | Defines when the character was born | birth = yes |
| death | yes/date/clause | 定义了角色死亡的时间。在该子句内,可以具体说明:
|
death = yes death = {death_reason = death_murder killer = 191004} |
| add_claim | title | 为角色增加了强烈的主张,对应于landed titles文件中的字母数字ID。
注:为了添加一个弱主张,可以使用以下方法: effect = {
add_weak_claim = k_england
}
|
add_claim = k_england |
| remove_claim | title | Removes a claim | remove_claim = k_england |
| add_spouse | charID | 定义了角色与他人之间的婚姻。使用字符ID | add_spouse = 121 |
| add_matrilineal_spouse | charID | add_matrilineal_spouse = 121 | |
| add_consort | charID | 让另一个角色成为该角色的配偶/妾室。使用字符ID | add_consort = 121
|
| remove_spouse | charID | 定义了角色与另一人婚姻的终结。使用字符ID | remove_spouse = 121 |
| add_lover | charID | add_lover = 122 | |
| employer | charID | 将角色移动到另一个角色的宫廷。使用字符ID | employer = 122 |
| give_job_title | job | Usually used under the same date tag as employer,给角色在另一个角色的宫廷中提供工作 | give_job_title = job_marshal |
| give_nickname | nickname | 为角色赋予昵称,对应于来自 nicknames files | give_nickname = nick_the_great |
| prestige | int | prestige = -50 | |
| piety | int | piety = -50 | |
| decadence | int | decadence = 50 | |
| wealth | int | wealth = -500 | |
| remove_trait | trait | remove_trait = "crusader" | |
| capital | title | Moves the capital | capital = c_toledo |
| dynasty | dynasty | Changes the dynasty | dynasty = 101183 |
| effect | commands | 命令在该日期应用,在角色范围内。请注意,这些命令只在游戏开始后执行,可能导致大厅出现差异[4].只有角色还没死时才会执行。 | effect = { give_minor_title = title_despot } effect = { set_character_flag = is_ragnar_lodbrok } |
| effect_even_if_dead | commands | 如上所述,但即使角色死亡后仍会执行。 | |
| raise_levies | clause | See details below | raise_levies = {
location=340 # Palermo
force_mult=1.5
}
|
| immortal_age | int | 设定角色成为不朽的身体年龄。还得加上一个不朽特质!
Note that without |
immortal_age = 20
|
以下准则用于促使哈罗德·戈德温森于1065年9月14日在莱斯特组建一支军队,人数是普通征兵的2.5倍:
1066.9.14 = {
raise_levies = {
location = 62 # Leicester
force_mult = 2.5
}
}
下个月,哈罗德·戈德温森因在黑斯廷斯战役中失利,被迫解散他的军队:
1066.10.14={
raise_levies = {
dismiss = yes
location = 62 # Leicester
force_mult = 2.5
}
}
当然,哈罗德也在战斗中阵亡,所以可以补充一个 death 群体标签,可以明确说明他在战斗中阵亡,并被征服者威廉杀害(ID 140):
1066.10.14={
raise_levies = {
dismiss = yes
location = 62 # Leicester
force_mult = 2.5
}
death = {
death_reason = death_battle
killer = 140
}
}
要启用维基百科图标链接(在游戏外浏览器打开),请创建带有格式的本地化密钥 W_L_<character_ID>:
W_L_200600;http://en.wikipedia.org/wiki/Sverker_I_of_Sweden;http://fr.wikipedia.org/wiki/Sverker_Ier_de_Su%C3%A8de ;;;;;;;;;;;;x
| 历史 | 角色 • 家族 • 省份 • 头衔 • 剧本 |
| 脚本 | 指令 • 条件 • 作用域 • 修正 • 事件 • 决议 |
| 常规 | 定义 • 游戏规则 • 另类开局 • 宗教 • 文化 • 政体 • 特质 • 血脉 • 科技 • 法律 • 建筑 • 宣战理由 • 朝贡国 • 单位 • 目标 • 疾病 • 死亡 • 荣誉头衔 • 社团 • 宝物 • 地图外政权 • 内阁成员 • 贸易路线 • 继承 • 奇观 • 称号 |
| 图像/音效/本地化 | 地图 • 图形 • 盾徽 • 肖像 • 界面 • 小地图 • 音乐 • 本地化 |
| 其他 | 故障排除 • 验证器 • 控制台指令 • 编辑游戏存档 • Steam创意工坊 • EU4转档器模组制作 |
CommandsCulture (Modding)Culture moddingDynasty moddingEU4转档器模组制作Portrait moddingReligion (Modding)Steam创意工坊Trait moddingTraits (Modding)事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色贸易路线模组制作