版本 Diff 差异对比
条目:任务树修改 · 对比历史版本与当前版本间的真实 Wikitext 差异
+41 行新增-42 行移除
历史基准版本Rev #103765
(未填写修改说明)
雨诉2024-09-24 14:48:44
当前最新版本Rev #103771
/* Provinces to highlight */
雨诉2024-10-23 12:25:50
Wikitext 语法逐行变动
当前版本新增历史版本移除
{{Version|长期有效}}
[[1.25 版本]]中新增加了任务树机制,任务树的文件位置在 {{path|missions/}}。
下面将对如何修改和增添新的任务树进行介绍。注意,任务树修改之后需要重新开局,仅仅读档并不会加载新的任务。在编写切换国家tag的事件/决议时,应当添加<code>swap_non_generic_missions = yes</code>一行代码以让游戏为新国家重新分配专有任务树(即不带有<code>generic=yes</code>)。
- == 任务 ==
+ == <big>任务</big> ==
任务树的基本结构如下:
- <series> = {
- slot = <int> # Which column the missions will appear in. 1 to 5.
- generic = <boolean> # Whether missions within this series are considered generic.
- ai = <boolean> # Whether the AI will claim missions in this series.
- has_country_shield = <boolean> # Whether to display the country shield on the icon.
+ <series> = { # 该列任务树的名称
+ slot = <int> # 该列任务树将出现在哪一列。从第一列到第五列。
+ generic = <boolean> # 该列任务树是否属于通用任务。yes为是通用任务,no为专属任务。
+ ai = <boolean> # AI是否会执行该列任务树中的任务。
+ has_country_shield = <boolean> # 是否在图标上显示国家盾牌。yes为会显示, no为不会显示。
- # Determines whether a series is loaded at all. Used to limit series to DLC.
+ # 决定是否加载该列任务树。用于将限制为是否拥有某 DLC。(一般用不到)
potential_on_load = {
<trigger>
}
- # Determines when a series appears for a country. Country scope.
+ # '''重要''' 决定该列任务树出现(显现)的条件。(作用域默认为国家作用域)
potential = {
<trigger>
}
- # The name of the mission, used for localization
+ # 用于本地化的单个任务名称
<mission> = {
- icon = <gfx> # The icon to use for the mission, without the file extension.
- position = <int> # Which row the mission appears in. 1 is top. If you omit this line, it will occupy the first row aviable.
- completed_by = <date> # Automatically completes mission in that date. Can also give this mission a non in-game date (like \"1999.11.11\") to never make them completing automatically.
-
- # Which missions must be completed before this mission is active.
+ icon = <gfx> # 任务图标,注意不包含图标文件的扩展名(即:my_icon1 '''<big>√</big>''' ;my_icon1.png '''<big>×</big>''')。
+ position = <int> # 该单一任务在本列任务树中的第几行,如果不填就默认在第一行(slot决定第几列,position决定在第几行,这两个构成了任务的坐标位置)。
+ completed_by = <date> # 在该日期内自动完成任务。也可以给这个任务一个非游戏中的日期(如 “1999.11.11”),使其永远不会自动完成。
+ # 该任务的前置任务(就是任务树里面的箭头,大括号里面直接填写某任务名称就可以,两个前置条件中间使用空格或者回车分隔开)。
required_missions = {
<mission>
}
- # Determines which provinces to highlight. Acts like all_province scope. Optional.
+ # 决定高亮哪些省份。
provinces_to_highlight = {
<trigger>
}
- # Determines when the mission is completed. Country scope.
+ # 完成该任务的条件(作用域默认为国家作用域)。
trigger = {
<trigger>
}
- # The effect executed when the mission is claimed. Country scope.
+ # 该任务完成时的效果(作用域默认为国家作用域)。
effect = {
<effect>
}
}
}
- === Slot ===
- Slots are the columns each mission appears in. By default, there are five columns, with 1 being the leftmost column, and 5 being the rightmost column. You can increase the number of columns by editing the interface files - more on that in the interface section below.
+ === <small>Slot-列</small> ===
+ 插槽是每个任务出现的列。默认情况下,共有五列,1 是最左边的一列,5 是最右边的一列。您可以通过编辑界面文件来增加列数,列数定义于 <code>countrymissionsview.gui</code>文件,在 <code>countrymissionsview_missions_gridbox</code> 之下的,参数 <code>max_slots_horizontal</code>。
- ===Generic or specific?===
- Missions are split into two types, generic and specific. Generic missions have the <code>generic = yes</code> tag in them. If a specific mission wants to use a space within the mission tree (for example, the top position in the first slot), it will override any generic missions that exist in that space. If you look in the missions folder at /Europa Universalis IV/missions/, you'll notice two files at the top called <code>00_Generic_missions</code>. If a nation doesn't have specific missions made specially for them, they'll use these generic missions instead. The reason for doing this is that some countries have specific missions only in certain columns (such as 1, 2, and 3), but they use generic missions for the fourth column.
+ ===<small>通用或专属?</small>===
+ 任务分为两类,即通用任务和专属任务。通用任务带有 generic = yes 标记。如果专属任务想使用任务树中的某个坐标(例如,第一槽的顶部位置),它将覆盖该坐标中存在的任何通用任务。如果您查看位于 /Europa Universalis IV/missions/ 的任务文件夹,您会发现顶部有两个名为 00_Generic_missions 的文件。如果一个国家没有专门为其制作的专属任务,就会使用这些通用任务来代替。
- You also create generic missions for certain types of nations. European nations get special generic missions in the <code>01_Generic_European_missions</code>, and there are also generic missions for other continents like Africa and India. You can use the <code>potential = { }</code> tag to limit your generic missions, which could still be replaced by specific ones.
+ 您还可以为某些类型的国家创建通用任务。欧洲国家在 <code>01_Generic_European_missions</code>中有特殊的通用任务,非洲和印度等其他大陆也有通用任务。您可以使用 <code>potential = { }</code> 来限制您的通用任务,这些任务仍可以被特定任务所取代。
- === Position ===
+ === <small>Position</small> ===
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 <code>position</code> 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 <code>swap_non_generic_missions = yes</code>, which will re-evaluate the triggers and swap series to match the country's current state.
- === Provinces to highlight ===
- Important to remember that you must use the following format to highlight areas (with examples provided):
+ === 高亮省份 ===
+ 请务必牢记,您必须使用以下格式来突出各个领域(举例说明):
- * Provinces: <code>province_id = 1856</code>
- * Areas: <code>area = sussex_area</code>
- * Regions: <code>region = italy_region</code>
- * Colonial Regions: <code>colonial_region = colonial_florida</code>
+ * 省份: <code>province_id = 1856</code>
+ * 直属州: <code>area = sussex_area</code>
+ * 地区: <code>region = italy_region</code>
+ * 殖民区域: <code>colonial_region = colonial_florida</code>
- To add more than one area or province being highlighted, you must use the <code>OR</code> operator:
- provinces_to_highlight = {
+ 要添加多个突出显示的地区或省份,必须使用 <code>OR</code> 运算符(不能使用<code>AND</code>运算符):
+ provinces_to_highlight = { #定义哪些省份高亮显示
OR = {
- area = corsica_sardinia_area
- area = sicily_area
- area = western_sicily_area
+ area = corsica_sardinia_area
+ area = sicily_area
+ area = western_sicily_area
}
}
- You might also want to highlight provinces that belong to a particular country. You can do this with the following option. Note that you can mix it with the other conditions mentioned above, as long as you use the OR operator.
+ 您可能还想突出显示属于某个国家的省份。您可以使用以下选项来实现这一目的。请注意,只要使用<code>OR</code> 运算符,您就可以将其与上述其他条件混合使用。
provinces_to_highlight = {
OR = {
- owned_by = NOV
- province_id = 310
+ owned_by = NOV #属于诺夫哥罗德
+ province_id = 310 #310号省份(诺夫哥罗德)
}
}
- It's often a good idea to add a limiter to prevent provinces out of these being shown. For example, in a conquest mission, you want to highlight all territories in a region except ones that you already own. You can add the following snippet of code to block those areas from showing: <code>NOT = { country_or_non_sovereign_subject_holds = ROOT }</code>. In the below example, it will highlight all provinces in the Italy region that are not owned by the country (ROOT just calls to the owner of the missions).
+ 通常情况下,添加一个限制器<code>limit</code>是个不错的主意,可以防止显示这些限制器之外的省份。例如,在征服任务中,您想高亮显示某个地区的所有领地,但您已经拥有的领地除外。您可以添加以下代码段来阻止显示这些地区: <code>NOT = { country_or_non_sovereign_subject_holds = ROOT }</code>. 在下面的示例中,它将高亮显示意大利地区不属于该国的所有省份。
provinces_to_highlight = {
region = italy_region
NOT = { country_or_non_sovereign_subject_holds = ROOT }
}
== Interface ==
The number of columns is defined in <code>countrymissionsview.gui</code>, under <code>countrymissionsview_missions_gridbox</code> by the attribute <code>max_slots_horizontal</code>.
The number of rows is unset, adding more will cause the listbox to start to scroll.
- The mission icons are found in <code>countrymissionsview.gfx</code>. To add your own icon, you must follow this format: spriteType = { name = \"<name>\" texturefile = \"gfx//interface//missions//<name>.dds\" } and you must also put an icon in the gfx/interface/missions folder called <name>.dds
+ The mission icons are found in <code>countrymissionsview.gfx</code>. To add your own icon, you must follow this format: spriteType = { name = "<name>" texturefile = "gfx//interface//missions//<name>.dds" } and you must also put an icon in the gfx/interface/missions folder called <name>.dds
==本地化==
需要对任务的名称以及简介进行本地化:
- <任务名称>_title: 0 \"任务名称\"
- <任务名称>_desc: 0 \"任务介绍\"
+ <任务名称>_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.
- [[任务|任务 - 欧陆风云4百科,人人可以编辑的欧陆风云4中文百科全书 (eu4cn.com)]]
+ [[任务]]
==参考资料==
<references />
对于1.25版本,所有DLC图标都在DLC的zip内部,没有对应的DLC就不可用。1.27以后mission目录下有了全套的图标,制做Mod更加灵活。已经上传到百科的全部任务图标在:[[:Category:任务图标]]。
{{Modding navbox}}
[[Category:模组制作]]
[[en:Mission_modding]]
