任务树修改
1.25 版本中新增加了任务树机制,任务树的文件位置在 Europa Universalis IV/missions/。
下面将对如何修改和增添新的任务树进行介绍。注意,任务树修改之后需要重新开局,仅仅读档并不会加载新的任务。在编写切换国家tag的事件/决议时,应当添加swap_non_generic_missions = yes一行代码以让游戏为新国家重新分配专有任务树(即不带有generic=yes)。
任务 #
任务树的基本结构如下:
# 决定是否加载该列任务树。用于将限制为是否拥有某 DLC。(一般用不到)
potential_on_load = {
# 重要 决定该列任务树出现(显现)的条件。(作用域默认为国家作用域)
potential = {
# 用于本地化的单个任务名称
# 该任务的前置任务(就是任务树里面的箭头,大括号里面直接填写某任务名称就可以,两个前置条件中间使用空格或者回车分隔开)。
required_missions = {
# 决定高亮哪些省份。
provinces_to_highlight = {
# 完成该任务的条件(作用域默认为国家作用域)。
trigger = {
# 该任务完成时的效果(作用域默认为国家作用域)。
effect = {
Slot-列 #
插槽是每个任务出现的列。默认情况下,共有五列,1 是最左边的一列,5
是最右边的一列。您可以通过编辑界面文件来增加列数,列数定义于
countrymissionsview.gui文件,在
countrymissionsview_missions_gridbox 之下的,参数
max_slots_horizontal。
通用或专属? #
任务分为两类,即通用任务和专属任务。通用任务带有 generic = yes 标记。如果专属任务想使用任务树中的某个坐标(例如,第一槽的顶部位置),它将覆盖该坐标中存在的任何通用任务。如果您查看位于 /Europa Universalis IV/missions/ 的任务文件夹,您会发现顶部有两个名为 00_Generic_missions 的文件。如果一个国家没有专门为其制作的专属任务,就会使用这些通用任务来代替。
您还可以为某些类型的国家创建通用任务。欧洲国家在
01_Generic_European_missions中有特殊的通用任务,非洲和印度等其他大陆也有通用任务。您可以使用
potential = { }
来限制您的通用任务,这些任务仍可以被特定任务所取代。
Position #
Each mission will appear in the order they are scripted, i.e. the
first mission appears in the top position, the second position below
top, and so on. This can be overridden with the position
attribute. You may want to do this if you need to have a gap between
missions within the column, or if you are starting another mission
series on the same column.
The mission series potential triggers can be re-checked by using
swap_non_generic_missions = yes, which will re-evaluate the
triggers and swap series to match the country's current state.
高亮省份 #
请务必牢记,您必须使用以下格式来突出各个领域(举例说明):
- 省份:
province_id = 1856 - 直属州:
area = sussex_area - 地区:
region = italy_region - 殖民区域:
colonial_region = colonial_florida
要添加多个突出显示的地区或省份,必须使用 OR
运算符(不能使用AND运算符): provinces_to_highlight = {
#定义哪些省份高亮显示 OR = { area = corsica_sardinia_area area =
sicily_area area = western_sicily_area } }
您可能还想突出显示属于某个国家的省份。您可以使用以下选项来实现这一目的。请注意,只要使用OR
运算符,您就可以将其与上述其他条件混合使用。 provinces_to_highlight = {
OR = { owned_by = NOV #属于诺夫哥罗德 province_id = 310
#310号省份(诺夫哥罗德) } }
通常情况下,添加一个限制器limit是个不错的主意,可以防止显示这些限制器之外的省份。例如,在征服任务中,您想高亮显示某个地区的所有领地,但您已经拥有的领地除外。您可以添加以下代码段来阻止显示这些地区:
NOT = { country_or_non_sovereign_subject_holds = ROOT }.
在下面的示例中,它将高亮显示意大利地区不属于该国的所有省份。
provinces_to_highlight = { region = italy_region NOT = {
country_or_non_sovereign_subject_holds = ROOT } }
Interface #
The number of columns is defined in
countrymissionsview.gui, under
countrymissionsview_missions_gridbox by the attribute
max_slots_horizontal.
The number of rows is unset, adding more will cause the listbox to start to scroll.
The mission icons are found in countrymissionsview.gfx.
To add your own icon, you must follow this format: spriteType = { name =
"
本地化 #
需要对任务的名称以及简介进行本地化: <任务名称>_title: 0 "任务名称" <任务名称>_desc: 0 "任务介绍"
Index of missions #
Here is a list of some sample missions that you could easily use to build a custom mission tree. Take care to read the above information carefully before implementing these.
参考资料 #
对于1.25版本,所有DLC图标都在DLC的zip内部,没有对应的DLC就不可用。1.27以后mission目录下有了全套的图标,制做Mod更加灵活。已经上传到百科的全部任务图标在::Category:任务图标。
