剧本模组制作:修订间差异

本页面所适用的版本可能已经过时,最后更新于2.6
(05:49, 20 July 2018‎ Lillebror)
(将英文界面进行翻译)
 
第3行: 第3行:
[[File:Starting_eras.jpg|600px|thumb|right|The starting era selection screen]]
[[File:Starting_eras.jpg|600px|thumb|right|The starting era selection screen]]


Bookmarks are defined in the <code>/common/bookmarks/</code> folder.
剧本由文件夹 <code>/common/bookmarks/</code> 定义。


==Bookmarks==
== 剧本==


Bookmarks can be appended/partly overwritten by including parts of the same bookmark in another file (<code>name</code>, <code>desc</code>, <code>date</code>, <code>era</code> and <code>picture</code>).<ref>[[forum:774248/page-23#post-20144691]]</ref>
通过在另一个文件中包含同一剧本的部分内容,可以附加/ 部分覆盖剧本 (<code>name</code>, <code>desc</code>, <code>date</code>, <code>era</code> <code>picture</code>).<ref>[[forum:774248/page-23#post-20144691]]</ref>


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
!Name
! 变量名称
!Type
! 变量类型
!Description
! 变量说明
!Example
! 代码示例
|-
|-
| name
|name
| key
|key 
| Localization key for the bookmark name. Vanilla convention is %bookmark%_ERA.
| 剧本名称的本地化键,ck2一般是 %bookmark%_ERA.
| <code>name = "BM_CHARLEMAGNE_ERA"</code>
|<code>name = "BM_CHARLEMAGNE_ERA"</code>
|-
|-
| desc
|desc
| key
|key
| Localization key for the bookmark description. Vanilla convention is %bookmark%_ERA_INFO.
| 剧本介绍的本地化键,ck2一般是 %bookmark%_ERA_INFO.
| <code>desc = "BM_CHARLEMAGNE_ERA_INFO"</code>
|<code>desc = "BM_CHARLEMAGNE_ERA_INFO"</code>
|-
|-
| date
|date
| date
|date 
| Bookmark date
| 剧本日期
| <code>date = 769.1.1</code>
|<code>date = 769.1.1</code>
|-
|-
| era
|era
| bool
|bool
| Will be shown on era screen. No more than 5 bookmarks can be highlighted, and will be picked chronologically. Note that if none is found it will use the first bookmark.
| 会不会出现在开局的五选一界面中。最多只能突出显示5个剧本,并将按时间顺序选择。如果所有剧本没有将该变量设为yes,将自动按照时间顺序显示前面五个。
| <code>era = yes</code>
|<code>era = yes</code>
|-
|-
| picture
|picture
| gfx
|gfx
| The picture to use on era screen.
| 开局五选一界面所用的照片
| <code>picture = GFX_pick_era_image_1</code>
|<code>picture = GFX_pick_era_image_1</code>
|-
|-
| custom_start
|custom_start
| bool
| bool
| The default bookmark to activate when choosing "Custom Start". At least one bookmark must be <code>custom_start = yes</code>, otherwise the game will CTD.
| 选择“自定义开始”时要激活的默认剧本。至少有一个剧本要设置为<code>custom_start = yes</code>, 否则游戏闪退。
| <code>custom_start = yes</code>
|<code>custom_start = yes</code>
|-
|-
|}
|}


==Selectable characters==
== 可选人物==


A bookmark can contain any number of characters, but the first 6 characters are highlighted for era bookmarks.
一个剧本可以包含多个人物,但是在开局五选一界面显示的角色最多是6个。
As of [[patch 2.5]] the character history is no longer processed in the era selection screen, selectable characters need to be explicitly defined, by duplicating part of their [[character modding|character history]].
[[patch 2.5|2.5版本]] ,角色的历史不会再显示于开局五选一界面中。可选择的角色需要通过复制其部分[[character modding| 角色历史]] 来明确该角色。


Selected characters can be appended by including parts of the same bookmark in another file, containing the new characters. However to remove or overwrite characters, the original file must be overwritten.
通过在另一个包含新角色的文件中包含同一剧本的部分,可以附加选定的角色。但是想要删除会添加角色,你必须去编辑原始的剧本文件。


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
!Name
! 变量名称
!Type
! 变量类型
!Description
! 变量说明
!Example
! 代码示例
|-
|-
| id
|id
| character
|character
| Character id. For non-era bookmarks, this is the only required info, as the rest will be deducted from the game files.
| 角色id。对于non-era 剧本,这是唯一需要的信息,因为其余的信息将从游戏文件中寻找。
| <code>id = 6392 # Charlemagne</code>
|<code>id = 6392 # 查理曼大帝</code>
|-
|-
| age
| age
| int
|int
| Character age at the time of the bookmark
| 剧本定义时间下,角色的年龄。
| <code>age = 26</code>
|<code>age = 26</code>
|-
|-
| name
|name 
| key
|key
| Character name. Vanilla convention is ERA_CHAR_NAME_%characterID%.
| 角色的名字,ck2一般是 ERA_CHAR_NAME_%characterID%.
| <code>name = ERA_CHAR_NAME_6392</code>
|<code>name = ERA_CHAR_NAME_6392</code>
|-
|-
| title
|title
| title
|title
| Primary title of the character, as defined via [[title modding|title history]].
| 角色的主要头衔,定义在 [[title modding|title history]].
| <code>title = k_france</code>
|<code>title = k_france</code>
|-
|-
| title_name
|title_name
| key
| key
| Localized (cultural) name of the title
| 本地化的( 文化的) 头衔名称。
| <code>title_name = WEST_FRANCIA</code>
|<code>title_name = WEST_FRANCIA</code>
|-
|-
| coa_dynasty
|coa_dynasty
| bool
|bool
| Replace the primary title by the dynasty coat of arms. This is for cultures that use <code>dynasty_title_names = yes</code>.
| 用家族的盾牌徽章代替主要头衔的盾牌徽章。能激活该变量要让文化特性满足<code>dynasty_title_names = yes</code>. 
| <code>coa_dynasty = yes</code>
|<code>coa_dynasty = yes</code>
|-
|-
| dlc
|dlc
| dlc
|dlc
| Whether the character requires a DLC to be playable (because its religion or government is DLC-locked).
| 该角色是否要DLC才能变成一个可玩角色。( 角色宗教或者政体可能需要DLC才能扮演).
| <code>dlc = "The Sword of Islam"</code>
|<code>dlc = "The Sword of Islam"</code>
|-
|-
| character
|character 
| clause
|clause
|


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
!Name
! 变量名称
!Description
! 变量描述
!Example
! 代码示例
|-
|-
| dna
|dna
| See [[portrait modding]]
| 详见[[portrait modding]]
| <code>dna = bcedirmbfcy</code>
|<code>dna = bcedirmbfcy</code>
|-
|-
| properties
|properties
| See [[portrait modding]]
| 详见[[portrait modding]]
| <code>properties = aj00bc00000</code>
|<code>properties = aj00bc00000</code>
|-
|-
| religion
|religion
|
|
| <code>religion="catholic"</code> 
|<code>religion="catholic"</code>
|-
|-
| culture
|culture
|
|
| <code>culture="old_frankish"</code>
|<code>culture="old_frankish"</code>
|-
|-
| government
|government
|
| <code>government = feudal_government</code>
|
<code>government = feudal_government</code>
|-
|-
| dynasty
|dynasty
|
|
| <code>dynasty=25061</code>
|<code>dynasty=25061</code>
|-
|-
|}
|}


|
<pre>
<pre>
character = {
character = {
第147行: 第148行:


==References==
==References==
<references/>
<references />


[[Category:模组制作]]
[[Category:模组制作]]
{{ModdingNavbox}}
{{ModdingNavbox}}
[[en:Bookmark modding]]
[[en:Bookmark modding]]

2025年5月16日 (五) 08:50的最新版本


The starting era selection screen

剧本由文件夹 /common/bookmarks/ 定义。

剧本

通过在另一个文件中包含同一剧本的部分内容,可以附加/部分覆盖剧本 (name, desc, date, erapicture).[1]

变量名称 变量类型 变量说明 代码示例
name key 剧本名称的本地化键,ck2一般是 %bookmark%_ERA. name = "BM_CHARLEMAGNE_ERA"
desc key 剧本介绍的本地化键,ck2一般是 %bookmark%_ERA_INFO. desc = "BM_CHARLEMAGNE_ERA_INFO"
date date 剧本日期 date = 769.1.1
era bool 会不会出现在开局的五选一界面中。最多只能突出显示5个剧本,并将按时间顺序选择。如果所有剧本没有将该变量设为yes,将自动按照时间顺序显示前面五个。 era = yes
picture gfx 开局五选一界面所用的照片 picture = GFX_pick_era_image_1
custom_start bool 选择“自定义开始”时要激活的默认剧本。至少有一个剧本要设置为custom_start = yes, 否则游戏闪退。 custom_start = yes

可选人物

一个剧本可以包含多个人物,但是在开局五选一界面显示的角色最多是6个。 在2.5版本,角色的历史不会再显示于开局五选一界面中。可选择的角色需要通过复制其部分角色历史来明确该角色。

通过在另一个包含新角色的文件中包含同一剧本的部分,可以附加选定的角色。但是想要删除会添加角色,你必须去编辑原始的剧本文件。

变量名称 变量类型 变量说明 代码示例
id character 角色id。对于non-era剧本,这是唯一需要的信息,因为其余的信息将从游戏文件中寻找。 id = 6392 # 查理曼大帝
age int 剧本定义时间下,角色的年龄。 age = 26
name key 角色的名字,ck2一般是 ERA_CHAR_NAME_%characterID%. name = ERA_CHAR_NAME_6392
title title 角色的主要头衔,定义在 title history. title = k_france
title_name key 本地化的(文化的)头衔名称。 title_name = WEST_FRANCIA
coa_dynasty bool 用家族的盾牌徽章代替主要头衔的盾牌徽章。能激活该变量要让文化特性满足dynasty_title_names = yes. coa_dynasty = yes
dlc dlc 该角色是否要DLC才能变成一个可玩角色。(角色宗教或者政体可能需要DLC才能扮演). dlc = "The Sword of Islam"
character clause
变量名称 变量描述 代码示例
dna 详见portrait modding dna = bcedirmbfcy
properties 详见portrait modding properties = aj00bc00000
religion religion="catholic"
culture culture="old_frankish"
government

government = feudal_government

dynasty dynasty=25061
character = {
	dna = bcedirmbfcy
	properties = aj00bc00000
	religion="catholic"
	culture="old_frankish"
	government = feudal_government
	dynasty=25061
}

References