版本 Diff 差异对比

条目:外交行动修改 · 对比历史版本与当前版本间的真实 Wikitext 差异

+42 行新增-41 行移除
历史基准版本Rev #43819
(未填写修改说明)
Pokewiz2018-07-13 03:04:30
当前最新版本Rev #76352
当前线上生效正文
拜月神教教首2020-08-23 13:19:17
Wikitext 语法逐行变动
当前版本新增历史版本移除
- {{version|长期有效}}{{需要翻译}}
+ {{version|长期有效}}
- There are two methods to modifying diplomatic actions: controlling the conditions of hard-coded interactions in {{path|common/diplomatic_actions}}, and adding new interactions in {{path|common/new_diplomatic_actions}}
+ 有两种方法修改外交行动:控制硬编码互动的条件,位于 {{path|common/diplomatic_actions}};以及增加新的互动,位于 {{path|common/new_diplomatic_actions}}。
- == Diplomatic actions ==
- The '''00_diplomatic_actions.txt''' file in {{path|common/diplomatic_actions}} controls the conditions for vanilla diplomatic actions, such as royal marriage. You cannot edit the effect of the interactions, only restrict when the action can be taken.
+ == 外交行动 ==
+ '''00_diplomatic_actions.txt''' 文件在 {{path|common/diplomatic_actions}},控制原版外交行动的条件,诸如王室联姻。你不能编辑互动的效果,只能限定何时能采取行动。
- To do so, you add a condition scope to the appropriate action scope, creating the action scope if it does not exist. For example, if you wanted to prevent ''study_technology'' from being used if the current country is a republic, you'd do the following:
+ 要做到这点,你能增加一个条件作用域到适当的行动作用域,如果它不存在就(按照注释)创建那个行动作用域。例如,你想要防止 ''study_technology'' 被使用,如果当前国家是一个共和国,你应该做下面这样:
<pre>
study_technology = {
condition = {
tooltip = CANNOT_STUDY_TECHNOLOGY
potential = {
government = republic
}
allow = {
always = no
}
}
}
</pre>
- The '''potential''' here is used to limit when the condition is applied. The '''allow''' on the other hand is used to restruct when the action is blocked.
+ 这里的 '''potential''' 用于限制何时条件被应用。在另一方面 '''allow''' 用于当行动被阻止时重构条件。
- You can add a tooltip with the '''tooltip''' line, which appears when the condition is valid and is disallowing the action.
+ 你能用 '''tooltip''' 这行添加一个工具提示,它会在条件有效且不被允许时显示。
- The general format is:
+ 一般的格式是:
<pre>
<action> = {
condition = {
tooltip = <string>
potential = {
<triggers>
}
allow = {
<triggers>
}
}
}
</pre>
- == New diplomatic actions ==
- The '''00diplomatic_actions.txt''' file in {{path|common/new_diplomatic_actions}} is used to implement new diplomatic actions. You can create new files for new actions.
+ == 新的外交行动 ==
+ '''00diplomatic_actions.txt''' 文件位于 {{path|common/new_diplomatic_actions}},它被用于实现新的外交行动。当然,在这个文件夹下建立新的文件也是可以的。00文件中包含示例和说明,显然,如果多个Mod都修改了它,就会造成冲突,所以为你的Mod新建一个专门的文件是必须的。
<pre>
<action> = {
- category = <category> # Which diplomatic action list the action will appear in.
+ category = <category> # 该行动会显示在哪个外交行动列表里。
- alert_index = <int> # The alert to use for the action. Refer to static_actions for the indexes. Optional.
- alert_tooltip = <key> # The localisation key to display in the alert tooltip. Optional.
+ alert_index = <int> # 用于该行动的警告。索引号参考 static_actions。可选的。
+ alert_tooltip = <key> # 要显示在警告工具提示的本地化关键字。可选的。
- require_acceptance = yes / no # Whether the action needs to be accepted by the target country for the accept effect to execute.
+ require_acceptance = yes / no # 是否该行动需要被目标国家接受,以便执行接受效果
- # Determines when the action is visible
+ # 决定何时该行动是可见的
is_visible = {
<triggers>
}
- # Determines when the action can be taken
+ # 决定何时该行动能被采用
is_allowed = {
<trigger>
- # variable_arithmetic_trigger can be used here to use export_to_variable to extract and compare values such as ruler_age, etc
}
- # Which effects to execute on acceptance
+ # 接受时执行哪个效果
on_accept = {
<effects>
}
- # Which effects to execute on decline (if declinable). Optional.
+ # 拒绝时(如果可拒绝)执行哪个效果。可选的。
on_decline = {
<effects>
}
- # Controls the AI's acceptance of the action, if acceptable. Optional.
+ # 控制AI对该行动的接受倾向,如果需要目标国家同意。非必须。
ai_acceptance = {
- # Add an AI factor entry
+ # 增加一条AI倾向修正
add_entry = {
- name = <key> # The localisation key to display for this factor
+ name = <key> # 要给这个因子显示的本地化关键字
- # Restricts this entry to the countries that validate the triggers. Optional.
+ # 限定这条记录的条件,可选项
limit = {
<triggers>
}
- # ai_value MUST always be created within an entry first.
+ # ai_value 每一条entry里'''必须'''被类似如下方式定义一次
export_to_variable = {
variable_name = ai_value
- value = <exportable value> # Which exportable value to export
- who = FROM # Who to export the value from
- with = THIS # Who the ai_value is for
+ value = <exportable value> # 要导出哪个可导出的值(可导出变量;具体可通过学习“变量”来掌握)
+ who = FROM # 该数值导出自谁
+ with = THIS # 该 ai_value 是给谁的
}
- # You can then change ai_value with effects such as multiply_variable, etc
+ # 然后你能用效果指令改变 ai_value,诸如 multiply_variable等
}
+ #所有的add_entry提及的ai_value最后会被加起来,决定ai是否接受
}
- # Controls the AI's usage of the action
+ # 控制AI对该行动的使用
ai_will_do = {
<triggers>
}
}
</pre>
- '''is_allowed''' makes use of the variable arithmetic trigger, for more information see [[Variables]]. Look at the examples in the '''00diplomatic_actions.txt''' file as well for further understanding.
+ '''is_allowed''' 可以使用变量算术触发器,有关更多信息请参阅 [[变量]]。查看在 '''00diplomatic_actions.txt''' 文件中的例子也会有更深的理解。
- ROOT is the country using the action, FROM is the country being targeted for the action.
+ ROOT 是使用该行动的国家,FROM 作为该行动的目标的国家。
- === Categories ===
- The diplomatic action category types:
+ === 目录 ===
+ 外交行动目录类型:
* alliance
* influence
* relation
* dynasty
* covert
* economy
* access
* emperor
* papacy
* great_powers
- === Localisation ===
- New diplomatic actions need the following localisation keys defined:
+ === 本地化 ===
+ 新的外交行动需要定义下列本地化关键字:
<pre>
- <action>: \"Action\"
- <action>_title: \"Action\"
- <action>_desc: \"Description\"
- <action>_tooltip: \"Description\"
- <action>_alert_tooltip: \"Action\"
+ <action>: "行动"
+ <action>_title: "行动"
+ <action>_desc: "描述"
+ <action>_tooltip: "描述"
+ <action>_alert_tooltip: "行动"
</pre>
{{Modding navbox}}
- [[Category:改派教程]]
+ [[Category:模组制作]]
+ [[en:Diplomatic action modding]]