版本 Diff 差异对比
条目:作用域 · 对比历史版本与当前版本间的真实 Wikitext 差异
+780 行新增-562 行移除
历史基准版本Rev #44810
/* Dual scopes */
自由之民2018-08-18 09:40:01
当前最新版本Rev #102112
当前线上生效正文
Cghvbnv222024-01-05 18:32:19
Wikitext 语法逐行变动
当前版本新增历史版本移除
{{version|1.23}}
- '''作用域'''是一个术语,用于指定[[条件]]或[[指令]]的作用范围。
+ {{N|作用域|scope}}是一个术语,用于指定[[条件]]或[[指令]]的作用范围。
+ 作用域是克劳塞维茨引擎脚本的核心概念,其地位堪比高级编程语言中的对象。它不只是代码段落、流程控制,还是各种指令操作的主体和客体。通过灵活地转换作用域范围(相当于显式的数据类型转换),能够在国家域中操作省份,也能修改省份所属国家。
- == Overview ==
- All script scopes operate on one of two internal scopes: ''country'' and ''province''. Scopes that are for a country scope will not function correctly when used in a province scope.
+ '''为了行文方便在此强调:文中的效果等同于指令,触发(器)等同于条件。'''
- Additionally, all script scopes operate in one of two type scopes: ''effect'' and ''trigger''. Using an effect scope within a trigger scope will not work, and vice versa. There are scopes that operate in both type scopes.
+ == 概述 ==
+ 所有脚本作用域都操作于两个内部域之一: ''country'' 或 ''province''。用于国家的作用域,当被用于省份域的时候不会正确地起作用。
- Which base scopes are ''effect'' and which are ''trigger'' depends on the feature you are modding. For example, in a decision: <code>potential = { }</code> and <code>allow = { }</code> are ''trigger'' scopes, whereas <code>effect = { }</code> is an ''effect'' scope. This is normally self-evident in most cases.
+ 另外,所有脚本作用域都操作在两种类型域之一: ''effect'' 或 ''trigger''。在触发器域内部使用一个效果域不会工作,反之亦然。也有一些作用域操作于两种类型之内。
- === Dynamic scopes ===
- Four script scopes are unique in that they change their contents depending on where they are used. They can be used in both ''effect'' and ''trigger'' scopes.
+ 哪种基本作用域是 ''effect'' 而哪种是 ''trigger'' 依赖于你正制做的Mod特性。举个例子,在一个决议中:<code>potential = { }</code> 和 <code>allow = { }</code> 是 ''trigger'' 作用域,反之<code>effect = { }</code> 是一个 ''effect'' 作用域。这在大多数情况下通常是不言自明的。
- {| class=\"wikitable sortable\" width=\"100%\"
- !Scope
- !Description
- !Example
- !Notes
+ === 动态作用域 ===
+ 有四种独特脚本作用域,它们会依据它们所用的位置改变它们的上下文。它们都能被用于 ''effect'' 和 ''trigger'' 作用域。
+ 动态作用域(Dynamic scopes),类似于对象别名。
+
+ {| class="wikitable sortable" width="100%"
+ !作用域
+ !描述
+ !示例
+ !注释
|-
|ROOT
- |The base scope.
- |The ROOT scope in a country event is the country that the event fires for.
+ |基础作用域(base scope)。
+ |ROOT 作用域在一个国家事件中是该事件发起的国家。
|
|-
|FROM
- |The calling scope.
- |The FROM scope in a country event would be the ROOT scope of another event that called it (via the <code>country_event = {}</code> effect).
+ |调用作用域(calling scope)。
+ |FROM 作用域在一个国家事件中可能是调用的它的另一个事件的 ROOT 作用域(通过<code>country_event = {}</code>效果)。
|
|-
|PREV
- |The previous scope.
- |If you change the scope to <code>FRA = { }</code> and then to change scope to <code>capital_scope = { }</code> within it, the PREV scope is <code>FRA = { }</code>.
+ |前一作用域(previous scope)。
+ |如果你先改变作用域到<code>FRA = { }</code>然后再改变作用域到其中的<code>capital_scope = { }</code>,那么 PREV 作用域就是<code>FRA = { }</code>。
|
|-
|THIS
- |The current scope.
- |If you change scope to <code>FRA = { }</code> and then the THIS scope is <code>FRA = { }</code> whilst used within the <code>FRA = { }</code> scope.
- |This is useful for effects and triggers when you want to point to a scope that isn't the ROOT scope without more scope switching.
+ |当前作用域(current scope)。
+ |如果你先改变作用域到<code>FRA = { }</code>然后 THIS 作用域就是<code>FRA = { }</code>,当它被用在 <code>FRA = { }</code> 作用域之内时。
+ |这对于效果和触发器很有用,当你想要指明一个作用域不是 ROOT 作用域而无需更多作用域切换的时候。
|}
- === Logic scopes ===
- There are three trigger scopes used to alter the boolean value of a trigger, or set of triggers. They are ''AND'', ''OR'' and ''NOT''.
+ === 逻辑作用域 ===
+ 有三种触发器作用域被用于改变触发条件或者触发集合的布尔值。它们是''AND''、''OR'' 和 ''NOT'',也就是“与或非”。
+ 逻辑作用域(Logic scopes),类似于逻辑运算符。
- The ''AND'' scope groups a set of triggers together, and returns true only if all triggers nested within return true as well. This scope is the default scope for all trigger scopes, so you don't need to explicitly use a ''AND'' scope most of the time.
+ ''AND''作用域把一个集合的触发器组合在一起,然后返回真,只在如果嵌套其中的所有触发器都返回真的时候。这个作用域是缺省作用域,对于所有触发器作用域而言,所以你在大多数时候不需要显式地使用 ''AND'' 作用域。
<pre>
AND = {
tag = FRA
stability = 1
}
</pre>
- The ''OR'' scope splits multiple sets of triggers, returning true if one of the sets of triggers nested within return true. This scope is used to make triggers return valid on state 1 ''or'' state 2 ''or'' state 3, and so on. Often the ''AND'' scope is used within the group multiple triggers together.
+ ''OR'' 作用域分开多个触发器集合,返回真,如果嵌套其中的触发器集合之一返回真。这个作用域用于让触发器在状态1 ''或'' 状态2 ''或'' 状态3,等等返回有效。''OR'' 和 ''AND'' 作用域经常被一起用在多个触发器组合之中。
<pre>
stability = 1
OR = {
tag = FRA
tag = CAS
}
</pre>
- The ''NOT'' scope inverts the truth value of a returned trigger. This allows you to check for the opposite instance of all triggers without needing an different trigger to do so. It also reverses the ''x'' or greater behaviour with numbers in triggers, making it less than ''x''.
+ ''NOT'' 作用域反转返回的触发器的真值。这允许你检查所有触发器的反面实例而无需一个不同的触发器去这么做。它也反转触发器中的数字 ''x'' 或是更大的行为,使它少于 ''x''。
<pre>
- NOT = { stability = 1 } # Returns true when stability is less than 1
+ NOT = { stability = 1 } # 如果稳定度小于1返回真
</pre>
- === Subscopes ===
- Many scopes return multiple subscopes. For example, <code>every_owned_province = { }</code> returns every owned province scope. This means any effect within this scope is executed in every province subscope. Likewise for trigger scopes, just with comparison instead.
+ 没有“逻辑蕴含(implication)”作用域。如果你需要表达一个蕴含关系(例如,P → Q,“如果P成立那么Q成立”),用或和否定构造的等价逻辑代替它(¬P ∨ Q,“(非 P) 或 Q”)。 举个例子,游戏编码的条件之一,用于各种宗教CB——“如果DLC《战争艺术》被激活而且进攻方和防御方都是神圣罗马帝国成员:威斯特伐利亚和约尚未发生”——就像下面这样:
+ <pre>
+ OR = {
+ NOT = { has_dlc = "Art of War" }
+ is_part_of_hre = no
+ FROM = { is_part_of_hre = no }
+ hre_religion_treaty = no
+ }
+ </pre>
- A quick reference on which scopes operate in this way:
- {| class=\"wikitable sortable\" width=\"100%\"
- !Scope Prefix
- !Type
- !Description
+ === 子作用域 ===
+ 很多作用域返回多个子作用域(multiple subscopes)。举个例子,<code>every_owned_province = { }</code>返回每一个拥有的省份作用域。这意味着在这个作用域内的任何效果都将在每一个省份子域中执行。对于触发器作用域也是同样的,只是把执行效果换成了比较真值。
+ 子作用域(subscopes),类似于子对象或者实例。
+
+ 关于哪个作用域如此操作的快速参考:
+ {| class="wikitable sortable" width="100%"
+ !作用域前缀
+ !类型
+ !描述
|-
|all_<scope>
- |Trigger
- |Requires valid trigger matches for '''all''' subscopes.
+ |触发器
+ |需要有效的触发器匹配 '''所有''' 子作用域。
|-
|any_<scope>
- |Trigger
- |Requires valid trigger matches for '''one''' subscope in the set.
+ |触发器
+ |需要有效的触发器匹配 '''一个''' 在此集合中的子作用域。
|-
|every_<scope>
- |Effect
- |Applies effects to '''all''' subscopes.
+ |效果
+ |应用效果到 '''所有''' 子作用域。
|-
|random_<scope>
- |Effect
- |Applies effects to '''one''' random subscope.
+ |效果
+ |应用效果到 '''一个''' 随机子作用域。
|-
|}
- === Limit scope ===
- For all effect scopes, you can nest a <code>limit = { }</code> to filter the returned subscopes.
+ === 限制作用域 ===
+ 对于所有效果作用域,你都能嵌套一个<code>limit = { }</code>来过滤返回的子域。
+ 限制作用域(Limit scopes),类似于过滤器或者筛选器。
- For example, the following returns subscopes of countries that have 3 Stability:
+ 举个例子,下列返回的国家子域有3稳定度:
<pre>
every_country = {
limit = {
stability = 3
}
}
</pre>
- Trigger scopes are inherently used for filtering, so do not require a limit scope.
+ 触发器作用域本来就用于过滤筛选,所以不需要限制作用域。
- === Tradenode scopes ===
- Theoretically tradenode scopes are province scopes. However, in practice you need to be within a tradenode scope to use tradenode effect and trigger scopes.
+ === 贸易节点作用域 ===
+ 理论上贸易节点作用域是省份作用域。但是,在实际上你需要在一个贸易节点作用域内,使用贸易节点效果和触发器域。
+ 也就是先要把国家域切换成贸易节点省,而不是普通省,然后才能进行贸易节点域的省份的判断和操作,因为那些操作对于普通省份域无效。
+ 贸易节点作用域(Tradenode scopes),类似于派生类。
- This means you cannot do this:
+ 这意味着你不能这么做:
<pre>
ROOT = {
every_privateering_country = {
}
}
</pre>
- Rather, you need to do this:
+ 相反,你需要这样做:
<pre>
ROOT = {
random_active_trade_node = {
every_privateering_country = {
}
}
}
</pre>
- == Dual scopes ==
+ == 双重作用域 ==
双重作用域(Dual scopes)能被用于 '''效果''' 和 '''触发器''' 两种上下文。然而它们在两种上下文中操作迥异。或者,可以说双重域在两种上下文中仅仅是拼写相同。
在一个效果域中,双重域将会像 <code>every_<scope></code> 那样行动并且应用效果指令到 '''所有''' 子域。
在一个触发器域中,双重域将会像 <code>any_<scope></code> 那样行动并且(按条件)匹配 '''一个''' 集合中的子域。
你能改变这一点,让双重域返回多于一个子域,通过包含 <code>type = all</code> 这行到双重域之中。这将会使双重域匹配 '''所有''' 子域。
<pre>
<region> = {
type = all
}
</pre>
- === Country and Province ===
-
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ === 国家和省份 ===
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|<province id>
|<code>110 = { }</code>
- |Refers to the province ids listed {{path|map/definition.csv}}
- |No
- |Province
+ |返回 省份ID,登记在 {{path|map/definition.csv}}
+ |{{icon|no}}
+ |省份
|1.1
|-
|<tag>
|<code>FRA = { }</code>
- |Refers to the country tags listed {{path|common/country_tags}}
- |No
- |Country
+ |返回 国家tag,登记在 {{path|common/country_tags}}
+ |{{icon|no}}
+ |国家
|1.1
|-
|<area>
|<code>western_mediterrenean_area = { }</code>
- |Refers to any area found in {{path|map/area.txt}}
- |Yes
- |Province
+ |返回 任何地区,在 {{path|map/area.txt}} 找到的
+ |{{icon|yes}}
+ |省份
|1.14
|-
|<region>
|<code>france_region = { }</code>
- |Refers to any region found in {{path|map/region.txt}}
- |Yes
- |Province
+ |返回 任何区域,在 {{path|map/region.txt}} 找到的
+ |{{icon|yes}}
+ |省份
|1.1
|-
|<superregion>
|<code>india_superregion = { }</code>
- |Refers to any superregion found in {{path|map/superregion.txt}}
- |Yes
- |Province
+ |返回 任何大区,在 {{path|map/superregion.txt}} 找到的
+ |{{icon|yes}}
+ |省份
|1.14 (1.15 for trigger)
|-
|<provincegroup>
|<code>my_prov_group = { }</code>
- |Refers to any province group found in {{path|map/provincegroup.txt}}
- |Yes
- |Province
+ |返回 任何省份组,在 {{path|map/provincegroup.txt}} 找到的
+ |{{icon|yes}}
+ |省份
|1.14 (1.15 for trigger)
|-
|<continent>
|<code>europe = { }</code>
- |Refers to any continent found in {{path|map/continent.txt}}
- |Yes
- |Province
+ |返回 任何大陆,在 {{path|map/continent.txt}} 找到的
+ |{{icon|yes}}
+ |省份
|1.1
|-
|<trade_company>
|<code>trade_company_west_africa = { }</code>
- |Refers to any trade company found in {{path|common/trade_companies/}}
- |Yes
- |Province
+ |返回 贸易公司,在 {{path|common/trade_companies/}} 找到的
+ |{{icon|yes}}
+ |省份
|1.6
|-
|<colonial_region>
|<code>colonial_alaska = { }</code>
- |Refers to any colonial region found in {{path|common/colonial_regions/}}
- |Yes
- |Province
+ |返回 任何殖民区域,在 {{path|common/colonial_regions/}} 找到的
+ |{{icon|yes}}
+ |省份
|1.4
|-
|<event_target>
|<code>event_target:my_event_target_name = { }</code>
- |Refers to the saved event target scope. Potentially can be any scope internally.
- |Yes
+ |返回 保存的事件目标作用域。潜在可能是任何内部作用域。
+ |{{icon|yes}}
|Any
|1.8
|-
|emperor
|<code>emperor = { }</code>
- |Refers to the country (if it exists) that is currently the Holy Roman Emperor.
- |No
- |Country
+ |返回 国家(如果它存在),是现任神圣罗马皇帝。
+ |{{icon|no}}
+ |国家
|1.1
|-
|revolution_target
|<code>revolution_target = { }</code>
- |Refers to the country (if it exists) that is the current revolution target.
- |No
- |Country
+ |返回 国家(如果它存在),是当前的革命目标。
+ |{{icon|no}}
+ |国家
|1.1
|-
|crusade_target
|<code>crusade_target = { }</code>
- |Refers to the country (if it exists) that is the current crusade target.
- |No
- |Country
+ |返回 国家(如果它存在),是当前的十字军目标。
+ |{{icon|no}}
+ |国家
|1.1
|}
- === Country ===
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ === 国家 ===
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|colonial_parent
|<code>colonial_parent = { }</code>
- |Refers to the country (if it exists) that is the colonial parent of the current country scope.
- |No
- |Country
+ |返回 国家(如果它存在),是当前国家作用域的殖民母国。
+ |{{icon|no}}
+ |国家
|1.4
|-
|overlord
|<code>overlord = { }</code>
- |Refers to the country (if it exists) that is the overlord of the current country scope.
- |No
- |Country
+ |返回 国家(如果它存在),是当前国家作用域的宗主国。
+ |{{icon|no}}
+ |国家
|1.1
|-
|capital_scope
|<code>capital_scope = { }</code>
- |Refers to the capital province of the current country scope.
- |No
- |Province
+ |返回 当前国家作用域的首都省份。
+ |{{icon|no}}
+ |省份
|1.1
- |-
- |home_trade_node
- |<code>home_trade_node = { }</code>
- |Refers to the home tradenode province of the current country scope.
- |No
- |Province
- |1.1
|}
- === Province ===
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ === 省份 ===
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|owner
|<code>150 = { owner = { } }</code>
- |Refers to the country that owns the current province scope.
- |No
- |Country
+ |返回 拥有当前省份作用域的国家。
+ |{{icon|no}}
+ |国家
|1.1
|-
|controller
|<code>150 = { controller = { } }</code>
- |Refers to the country that controls the current province scope.
- |No
- |Country
+ |返回 控制当前省份作用域的国家。
+ |{{icon|no}}
+ |国家
|1.1
|-
|sea_zone
|<code>150 = { sea_zone = { } }</code>
- |Refers to an adjacent sea province that the current province scope is next to.
- |No
- |Province
+ |返回 当前陆地省份有港口所在的海洋省份。
+ |{{icon|no}}
+ |省份
|1.1
|-
|area
|<code>150 = { area = { } }</code>
- |Refers to the area that the current province scope is in.
- |Yes
- |Province
+ |返回 当前省份作用域位于的地区。
+ |{{icon|yes}}
+ |省份
|1.14
|-
|region
|<code>150 = { region = { } }</code>
- |Refers to the region that the current province scope is in.
- |Yes
- |Province
+ |返回 当前省份作用域位于的区域。
+ |{{icon|yes}}
+ |省份
|1.14
|}
- === Tradenode ===
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ === 贸易节点 ===
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|most_province_trade_power
|<code>most_province_trade_power = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |在该贸易节点中从省份产生最多贸易力量的国家。
+ |{{icon|no}}
+ |国家
|1.1
|-
|strongest_trade_power
|<code>strongest_trade_power = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |在该节点有最多贸易力量的国家。
+ |{{icon|no}}
+ |国家
|1.1
|}
- == Effect scopes ==
- All effect scopes can be limited with the <code>limit = { }</code> scope within. For example:
+ == 效果作用域 ==
+ 所有效果作用域(effect scopes)都可能匹配多个子域,加上<code>if</code>,能被其中的<code>limit = { }</code>限定。举个例子:
<pre>
every_country = {
limit = {
<triggers>
}
<effects>
}
</pre>
+ 作用域能选择随机的子作用域(例如<code>random_owned_province</code>)作为它们应用限定条件后的选择。
- === Country ===
- Used within the country scopes, i.e. <code>FRA = { }</code>
+ === 国家 ===
+ 用在国家作用域里——例如,<code>FRA = { }</code>
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|every_ally
|<code>every_ally = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合限制中的触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_coalition_member
|<code>every_coalition_member = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 包围网成员,对抗当前作用域(如果有任何一个)。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_country
|<code>every_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,在世界上。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_elector
|<code>every_elector = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 神罗的选帝侯。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_enemy_country
|<code>every_enemy_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合限制中的触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_known_country
|<code>every_known_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,已经被当前作用域发现。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_local_enemy
|<code>every_local_enemy = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合限制中的触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_neighbor_country
|<code>every_neighbor_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,和当前作用域共有边界(不包括海区)。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_rival_country
|<code>every_rival_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合限制中的触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|every_subject_country
|<code>every_subject_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 附属国,在当前作用域之下。
+ |{{icon|yes}}
+ |国家
|1.4
|-
|random_ally
|<code>random_ally = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合限制中的触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_coalition_member
|<code>random_coalition_member = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机包围网成员,对抗当前作用域。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_country
|<code>random_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机国家,在世界上所有国家之中。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_elector
|<code>random_elector = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机 神罗的选帝侯。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_enemy_country
|<code>random_enemy_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合限制中的触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_known_country
|<code>random_known_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机国家,已经被当前作用域发现。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_local_enemy
|<code>random_local_enemy = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合限制中的触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_neighbor_country
|<code>random_neighbor_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机国家,和当前作用域共有边界(不包括海区)。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_rival_country
|<code>random_rival_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合限制中的触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|random_subject_country
|<code>random_subject_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机附属国,在当前作用域之下。
+ |{{icon|no}}
+ |国家
|1.4
|-
|every_core_province
|<code>every_core_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,这个国家有核心在,无论是否拥有。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|every_heretic_province
|<code>every_heretic_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,其宗教对于当前作用域是异端。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|every_owned_province
|<code>every_owned_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,当前作用域拥有的。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|every_province
|<code>every_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.<br>'''Note:''' executing effects on every province without a limit will cause slowdown in game.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,在世界上。<br>'''注意:'''对每一个省份执行效果而没有限制,将会拖慢游戏。使用更具体的东西,如果你能的话。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|random_core_province
|<code>random_core_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,当前作用域有核心在,无论是否拥有。
+ |{{icon|no}}
+ |省份
|1.1
|-
|random_heretic_province
|<code>random_heretic_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,其宗教对于当前作用域是异端。
+ |{{icon|no}}
+ |省份
|1.1
|-
|random_owned_area
|<code>random_owned_area = { }</code>
- |Scopes to '''one''' valid area that meet the triggers in the limit.<br>You can use <code>type = all</code> to scope to '''all''' valid areas.
- |No
- |Province
+ |检查域内 '''一个''' 有效地区,符合限制中的触发条件。<br>你能使用 <code>type = all</code> 来检查域内 '''所有''' 有效地区。
+ |{{icon|no}}
+ |省份
|1.18
|-
|random_owned_province
|<code>random_owned_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,当前作用域拥有的。
+ |{{icon|no}}
+ |省份
|1.1
|-
|every_trade_node
|<code>every_trade_node = { }</code>
- |Scopes to '''all''' valid tradenode (province) that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 贸易节点。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|random_active_trade_node
|<code>random_active_trade_node = { }</code>
- |Scopes to '''one''' valid tradenode (province) that meet the triggers in the limit.<br>Active means the current scope is interacting with the tradenode in some way.
- |No
- |Province
+ |检查域内 '''一个''' 有效贸易节点(省份),符合限制中的触发条件。<br>活动意味着当前作用域正在与该贸易节点以某种方式互动。
+ |{{icon|no}}
+ |省份
|1.18
|-
|random_trade_node
|<code>random_trade_node = { }</code>
- |Scopes to '''one''' valid tradenode (province) that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机贸易节点。
+ |{{icon|no}}
+ |省份
|1.1
+ |-
+ |home_trade_node_effect_scope
+ |<code>home_trade_node_effect_scope = { }</code>
+ |Scopes to the trade node where the country has its main trading port.
+ |{{icon|no}}
+ |Province
+ |
+ |-
+ |every_capital_province
+ |<code>every_capital_province = { }</code>
+ |检查域内 '''所有''' 首都省份。
+ |{{icon|yes}}
+ |Province
+ |1.34
+ |-
+ |random_capital_province
+ |<code>random_capital_province = { }</code>
+ |检查域内 '''一个''' 随机首都省份。
+ |{{icon|no}}
+ |Province
+ |1.34
+ |-
+ |every_claimed_province
+ |<code>every_claimed_province = { }</code>
+ |检查域内 '''所有''' 省份,当前作用域有宣称在,无论是否拥有。
+ |{{icon|yes}}
+ |Province
+ |1.34
+ |-
+ |random_claimed_province
+ |<code>random_claimed_province = { }</code>
+ |检查域内 '''一个''' 随机省份,当前作用域有宣称在,无论是否拥有。
+ |{{icon|no}}
+ |Province
+ |1.34
+ |-
+ |every_war_enemy_country
+ |<code>every_war_enemy_country = { }</code>
+ |检查域内 '''所有''' 有效国家,与当前作用域处于战争状态。
+ |{{icon|yes}}
+ |Country
+ |1.34
+ |-
+ |random_war_enemy_country
+ |<code>random_war_enemy_country = { }</code>
+ |检查域内 '''一个''' 随机国家,与当前作用域处于战争状态。
+ |{{icon|no}}
+ |Country
+ |1.34
+ |-
+ |random_hired_mercenary_company
+ |<code>random_hired_mercenary_company = { }</code><br>
+ Possible parameters:<br>
+ <code>template = <string></code><br>
+ Optional: Checks whether the mercenary company uses the specified template.<br>
+ <code>is_foreign_company = yes</code><br>
+ Optional: Checks whether the mercenary company is of foreign origin.<br>
+ <code>hired_for_months = <int></code><br>
+ Optional: Checks how long the mercenary company has been hired.<br>
+ <code>has_company_manpower = <int></code><br>
+ Optional: Checks whether the company has X% of its manpower (can be negated by <code>NOT = { }</code>).<br>
+ <code>home_province = { }</code><br>
+ Optional: Scopes to the company's home province if existing.<br>
+ <code>location = { }</code><br>
+ Optional: Scopes to the current province location of the company.
+ |Scopes to '''one''' random mercenary companies currently hired by the current scope.
+ |{{icon|no}}
+ |Unit
+ |1.30
+ |-
+ |every_country_including_inactive
+ |<code>every_country_including_inactive = { }</code>
+ |Scopes to '''all''' country tags, even countries that do not own any provinces on the map. Avoid this if you can use something more specific.
+ |{{icon|yes}}
+ |Country
+ |1.31.4
|}
- === Province ===
- Used within the province scopes, i.e. <code>capital_scope = { }</code>
+ === 省份 ===
+ 用在省份作用域里——例如,<code>capital_scope = { }</code>。这些一般只选择陆地省份。
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|every_empty_neighbor_province
|<code>every_empty_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|no}}
+ |省份
|1.1
|-
|every_neighbor_province
|<code>every_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.<br>Does not include empty provinces.
- |No
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?)。<br>不包括空的省份。
+ |{{icon|no}}
+ |省份
|1.1
|-
|every_province_in_state
|<code>every_province_in_state = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''所有''' 省份,在同一个州(地区?)
+ |{{icon|no}}
+ |省份
|1.20
|-
|random_empty_neighbor_province
|<code>random_empty_neighbor_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|no}}
+ |省份
|1.1
|-
|random_neighbor_province
|<code>random_neighbor_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.<br>Does not include empty provinces.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,和当前作用域共有边界(或海区?)。<br>不包括空的省份。
+ |{{icon|no}}
+ |省份
|1.1
|-
|random_province_in_state
|<code>random_province_in_state = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,和当前作用域在同一个州。
+ |{{icon|no}}
+ |省份
|1.20
|-
|random_province
|<code>random_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份,在世界上所有省份之中。
+ |{{icon|no}}
+ |省份
|1.1
|-
|every_core_country
|<code>every_core_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.<br>Core as in the cores in a province.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,有核心在当前作用域,无论是否存在。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|random_core_country
|<code>random_core_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.<br>Core as in the cores in a province.
- |No
- |Province
+ |检查域内 '''一个''' 随机国家,有核心在当前作用域,无论是否存在。
+ |{{icon|no}}
+ |国家
|1.1
|-
|every_empty_neighbor_province
|<code>every_empty_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|no}}
+ |省份
|1.1
+ |-
+ |every_tribal_land_province
+ |<code>every_tribal_land_province = { }</code>
+ |检查域内 '''所有''' 部落领地省份。
+ |{{icon|no}}
+ |省份
+ |1.32
|}
- === Tradenode ===
- Used within the tradenode scopes, i.e. <code>random_active_trade_node = { }</code>
+ === 贸易节点 ===
+ 用在贸易节点作用域里——例如,<code>random_active_trade_node = { }</code>
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|every_privateering_country
|<code>every_privateering_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家正在发出私掠船到当前作用域。
+ |{{icon|yes}}
+ |国家
|1.6
|-
|random_privateering_country
|<code>random_privateering_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机国家正在发出私掠船到当前作用域。
+ |{{icon|no}}
+ |国家
|1.6
|-
|every_trade_node_member_country
|<code>every_trade_node_member_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers in the limit.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家在当前作用域拥有省份。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|random_trade_node_member_country
|<code>random_trade_node_member_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers in the limit.
- |No
- |Country
+ |检查域内 '''一个''' 随机国家在当前作用域拥有省份。
+ |{{icon|no}}
+ |国家
|1.1
|-
|every_trade_node_member_province
|<code>every_trade_node_member_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份在当前贸易节点。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|random_trade_node_member_province
|<code>random_trade_node_member_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 随机省份在当前贸易节点。
+ |{{icon|no}}
+ |省份
|1.1
|}
- === Unit ===
- Used within the unit scopes.
+ === 单位 ===
+ 用在单位作用域里
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|unit_owner
|<code>unit_owner = { }</code>
- |Returns the unit's owner country scope.<br>Usable from <code>on_battle_won_unit</code> and <code>on_battle_lost_unit</code> on actions.
- |No
- |Country
+ |返回 该单位的拥有者国家作用域。<br>可用自 <code>on_battle_won_unit</code> 和 <code>on_battle_lost_unit</code> 的行动。
+ |{{icon|no}}
+ |国家
|1.1
+ |-
+ |enemy_unit
+ |<pre>
+ enemy_unit = { }
+ </pre>
+ |Scopes to units that are considered enemies.
+ Only used within <code>on_battle_won_unit</code> and <code>on_battle_lost_unit</code> on actions.
+ |{{icon|no}}
+ |Unit
+ |1.1
+ |-
+ |location
+ |<pre>
+ location = { }
+ </pre>
+ |Scopes to the unit's current location.
+ |{{icon|no}}
+ |Province
+ |1.30
|}
- === Missions ===
- Only available in missions found in {{path|missions}}.
+ === 任务 ===
+ 只可用于在{{path|missions}}找到的任务。
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|every_target_province
|<code>every_target_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers in the limit.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,在指定为任务中的目标的省份之中。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|random_target_province
|<code>random_target_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers in the limit.
- |No
- |Province
+ |检查域内 '''一个''' 省份,在指定为任务中的目标的省份之中。
+ |{{icon|no}}
+ |省份
|1.1
|}
- == Trigger scopes ==
- === Country ===
- Used within the country scopes, i.e. <code>FRA = { }</code>
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ == 触发器作用域 ==
+ === 国家 ===
+ 用在国家作用域里——例如,<code>FRA = { }</code>
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|any_army
|<code>any_army = { }</code>
- |Returns an unit scope.
- |No
+ |检查域内 '''所有''' 军队,由当前作用域正在派出的。
+ |{{icon|no}}
|Unit
|1.1
|-
|all_ally
|<code>all_ally = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_coalition_member
|<code>all_coalition_member = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 包围网成员,对抗当前作用域(如果有任何一个)。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_country
|<code>all_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,在世界上。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_elector
|<code>all_elector = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 神罗的选帝侯。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_enemy_country
|<code>all_enemy_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_known_country
|<code>all_known_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,已经被当前作用域发现。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_local_enemy
|<code>all_local_enemy = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_neighbor_country
|<code>all_neighbor_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家,拥有省份和当前作用域拥有的省份共有边界(或海区?)。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_rival_country
|<code>all_rival_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 有效国家,符合触发条件。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|all_subject_country
|<code>all_subject_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 附属国,在当前作用域之下。
+ |{{icon|yes}}
+ |国家
|1.4
|-
|all_core_province
|<code>all_core_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,当前作用域有核心在,无论是否拥有。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_heretic_province
|<code>all_heretic_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,其宗教对于当前作用域是异端。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_owned_province
|<code>all_owned_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,当前作用域拥有的。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_province
|<code>all_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,在世界上。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_state_province
|<code>all_state_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域在同一个州。
+ |{{icon|yes}}
+ |省份
|1.20
|-
|all_states
|<code>all_states = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 当前作用域的州。
+ |{{icon|yes}}
+ |省份
|1.20
|-
|all_active_trade_node
|<code>all_active_trade_node = { }</code>
- |Scopes to '''all''' valid tradenodes (province) that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 活动的贸易节点。
+ |{{icon|yes}}
+ |省份
|1.18
|-
|all_trade_node
|<code>all_trade_node = { }</code>
- |Scopes to '''all''' valid tradenodes (province) that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 贸易节点。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|any_ally
|<code>any_ally = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_coalition_member
|<code>any_coalition_member = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 包围网成员对抗当前作用域。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_country
|<code>any_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 国家,在世界上所有国家之中。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_elector
|<code>any_elector = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 神罗的选帝侯。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_enemy_country
|<code>any_enemy_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_known_country
|<code>any_known_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 国家,已经被当前作用域发现。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_local_enemy
|<code>any_local_enemy = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_neighbor_country
|<code>any_neighbor_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 国家 ,和当前作用域共有边界(或海区?)。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_rival_country
|<code>any_rival_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 有效国家,符合触发条件。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_subject_country
|<code>any_subject_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |No
- |Country
+ |检查域内 '''一个''' 附属国,在当前作用域之下。
+ |{{icon|no}}
+ |国家
|1.4
|-
|any_core_province
|<code>any_core_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,当前作用域有核心在,无论是否拥有。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_heretic_province
|<code>any_heretic_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,其宗教对于当前作用域是异端。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_owned_province
|<code>any_owned_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,当前作用域拥有的。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_province
|<code>any_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,从世界上所有国家之中。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_state
|<code>any_state = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 当前作用域的州。
+ |{{icon|no}}
+ |省份
|1.20
|-
|any_active_trade_node
|<code>any_active_trade_node = { }</code>
- |Scopes to '''one''' valid tradenode (province) that meet the triggers.<br>Note: will return true if a merchant is placed, even without explicit triggers.
- |No
- |Province
+ |检查域内 '''一个''' 有效贸易节点(省份),符合触发条件。<br>注意:如果放了商人将会返回真,即便没有明确的触发条件。
+ |{{icon|no}}
+ |省份
|1.18
|-
|any_trade_node
|<code>any_trade_node = { }</code>
- |Scopes to '''one''' valid tradenode (province) that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 贸易节点,在世界上所有贸易节点之中。
+ |{{icon|no}}
+ |省份
|1.1
+ |-
+ |home_trade_node
+ |<code>home_trade_node = { }</code>
+ |检查域内 贸易节点,包含当前作用域的主贸易港口(贸易本埠)。
+ |{{icon|no}}
+ |省份
+ |1.1
+ |-
+ |any_tribal_land
+ |<code>any_tribal_land = { }</code>
+ |检查域内 '''一个''' 部落领地省份,符合触发条件。
+ |{{icon|no}}
+ |省份
+ |1.32
+ |-
+ |all_countries_including_self
+ |<code>all_countries_including_self = { }</code>
+ |Scopes to '''all''' countries in the world including your own country. Avoid this if you can use something more specific.
+ |{{icon|yes}}
+ |国家
+ |1.26
+ |-
+ |any_great_power
+ |<code>any_great_power = { }</code>
+ |Scopes to '''one''' great power among all great powers in the world '''including''' the ROOT country.
+ |{{icon|no}}
+ |Country
+ |1.30
+ |-
+ |any_other_great_power
+ |<code>any_other_great_power = { }</code>
+ |Scopes to '''one''' great power among all great powers in the world '''except''' the ROOT country.
+ |{{icon|no}}
+ |Country
+ |1.30
+ |-
+ |all_capital_provinces
+ |<code>all_capital_provinces = { }</code>
+ |检查域内 '''所有''' 省份,当前作用域是首都,无论是否拥有。
+ |{{icon|yes}}
+ |Province
+ |1.34
+ |-
+ |any_capital_province
+ |<code>any_capital_province = { }</code>
+ |检查域内 '''一个''' 省份,当前作用域是首都,无论是否拥有。
+ |{{icon|no}}
+ |Province
+ |1.34
+ |-
+ |all_claimed_provinces
+ |<code>all_claimed_provinces = { }</code>
+ |检查域内 '''所有''' 省份,当前作用域有宣称在,无论是否拥有。
+ |{{icon|yes}}
+ |Province
+ |1.34
+ |-
+ |any_claimed_province
+ |<code>any_claimed_province = { }</code>
+ |检查域内 '''一个''' 省份,当前作用域有宣称在,无论是否拥有。
+ |{{icon|no}}
+ |Province
+ |1.34
+ |-
+ |any_war_enemy_country
+ |<code>any_war_enemy_country = { }</code>
+ |检查域内 '''一个''' 国家 ,与当前作用域处于战争状态。
+ |{{icon|no}}
+ |Country
+ |1.34
+ |-
+ |all_war_enemy_countries
+ |<code>all_war_enemy_countries = { }</code>
+ |检查域内 '''所有''' 国家 ,与当前作用域处于战争状态。
+ |{{icon|yes}}
+ |Country
+ |1.34
+ |-
+ |any_hired_mercenary_company
+ |<code>any_hired_mercenary_company = { }</code><br>
+ Possible parameters:<br>
+ <code>template = <string></code><br>
+ Optional: Checks whether the mercenary company uses the specified template.<br>
+ <code>is_foreign_company = yes</code><br>
+ Optional: Checks whether the mercenary company is of foreign origin.<br>
+ <code>hired_for_months = <int></code><br>
+ Optional: Checks how long the mercenary company has been hired.<br>
+ <code>has_company_manpower = <int></code><br>
+ Optional: Checks whether the company has X% of its manpower (can be negated by <code>NOT = { }</code>).<br>
+ <code>home_province = { }</code><br>
+ Optional: Scopes to the company's home province if existing.<br>
+ <code>location = { }</code><br>
+ Optional: Scopes to the current province location of the company.
+ |Scopes to '''one''' mercenary companies currently hired by the current scope.
+ |{{icon|no}}
+ |Unit
+ |1.30
|}
- === Province ===
- Used within the province scopes, i.e. <code>capital_scope = { }</code>
+ === 省份 ===
+ 用在省份作用域里——例如,<code>capital_scope = { }</code>
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|all_empty_neighbor_province
|<code>all_empty_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_province_in_state
|<code>all_province_in_state = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域在同一个州。
+ |{{icon|yes}}
+ |省份
|1.20
|-
|all_neighbor_province
|<code>all_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.<br>Does not include empty provinces.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?)。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|all_empty_neighbor_province
|<code>all_empty_neighbor_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|any_empty_neighbor_province
|<code>any_empty_neighbor_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,和当前作用域共有边界(或海区?),是可殖民的且未被殖民。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_province
|<code>any_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,在世界上所有省份之中。避免使用这个,如果你能使用更具体的东西。
+ |{{icon|no}}
+ |省份
|1.1
|-
|any_province_in_state
|<code>any_province_in_state = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
+ |检查域内 '''一个''' 省份,和当前作用域在同一个州。
+ |{{icon|no}}
+ |省份
|1.20
|-
|any_friendly_coast_border_province
|<code>any_friendly_coast_border_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.<br>Friendly means positive relations, or owned by self.
- |No
- |Province
+ |检查域内 '''一个''' 省份,和当前作用域共有边界,是对当前作用域友好的(意味着其拥有者是相同的或者有正数关系)。
+ |{{icon|no}}
+ |省份
|1.18
|-
|any_neighbor_province
|<code>any_neighbor_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.<br>Does not include empty provinces.
- |No
- |Province
+ |检查域内 '''一个''' 省份,和当前作用域共有边界(或海区?)。
+ |{{icon|no}}
+ |省份
|1.1
|-
|all_core_country
|<code>all_core_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |No
- |Province
+ |检查域内 '''所有''' 国家,有核心在当前作用域,无论是否存在。
+ |{{icon|no}}
+ |国家
|1.1
|-
|any_core_country
|<code>any_core_country = { }</code>
- |Scopes to '''all''' valid countries that meet the triggers.
- |No
- |Province
+ |检查域内 '''所有''' 国家,有核心在当前作用域,无论是否存在。
+ |{{icon|no}}
+ |国家
|1.1
+ |-
+ |colonial_region_for_scope_province
+ |<code>colonial_region_for_scope_province = { }</code>
+ |Scopes to the colonial region that the current province scope is in. Used with <code>type = all</code> when you want to target all provinces of a colonial region.
+ |{{icon|no}}
+ |Province
+ |1.30
|}
- === Tradenode ===
- Used within the tradenode scopes, i.e. <code>any_active_trade_node = { }</code>
+ === 贸易节点 ===
+ 用在贸易节点作用域里——例如,<code>any_active_trade_node = { }</code>
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|all_privateering_country
|<code>all_privateering_country = { }</code>
- |Scopes to '''all''' valid country that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家正在发出私掠船到当前作用域。
+ |{{icon|yes}}
+ |国家
|1.6
|-
|all_trade_node_member_country
|<code>all_trade_node_member_country = { }</code>
- |Scopes to '''all''' valid country that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''所有''' 国家在当前贸易节点拥有省份。
+ |{{icon|yes}}
+ |国家
|1.1
|-
|any_privateering_country
|<code>any_privateering_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''一个''' 国家正在发出私掠船到当前作用域。
+ |{{icon|yes}}
+ |国家
|1.6
|-
|any_trade_node_member_country
|<code>any_trade_node_member_country = { }</code>
- |Scopes to '''one''' valid country that meet the triggers.
- |Yes
- |Country
+ |检查域内 '''一个''' 国家在当前贸易节点拥有省份。
+ |{{icon|yes}}
+ |国家
|1.1
|-
- |any_trade_node_member_province
- |<code>any_trade_node_member_province = { }</code>
- |Scopes to '''one''' valid province that meet the triggers.
- |No
- |Province
- |1.1
- |-
|all_trade_node_member_province
|<code>all_trade_node_member_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |No
- |Province
+ |检查域内 '''所有''' 省份在当前贸易节点。
+ |{{icon|no}}
+ |省份
|1.1
+ |-
+ |any_trade_node_member_province
+ |<code>any_trade_node_member_province = { }</code>
+ |检查域内 '''一个''' 省份在当前贸易节点。
+ |{{icon|no}}
+ |省份
+ |1.1
|}
- === Missions ===
- Only available in missions found in {{path|missions}}.
+ === 任务 ===
+ 只可用于在{{path|missions}}找到的任务。
- {| class=\"wikitable sortable\" width=\"100%\"
- ! width=\"15%\" | Name
- ! width=\"20%\" | Example
- ! width=\"25%\" | Description
- ! width=\"5%\" | Multiple Subscopes
- ! width=\"5%\" | Changes Scope To
- ! width=\"10%\" | Version Added
+ {| class="wikitable sortable" width="100%"
+ ! width="15%" | 名称
+ ! width="20%" | 示例
+ ! width="25%" | 描述
+ ! width="5%" | 多个子域
+ ! width="5%" | 改变作用域到
+ ! width="10%" | 添加版本
|-
|all_target_province
|<code>all_target_province = { }</code>
- |Scopes to '''all''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''所有''' 指定为任务中的目标的省份。
+ |{{icon|yes}}
+ |省份
|1.1
|-
|any_target_province
|<code>any_target_province = { }</code>
- |Scopes to '''one''' valid provinces that meet the triggers.
- |Yes
- |Province
+ |检查域内 '''一个''' 指定为任务中的目标的省份。
+ |{{icon|yes}}
+ |省份
|1.1
|}
- == References ==
+ == 参考资料 ==
<references/>
{{Modding navbox}}
- [[Category:改派教程]]
+ [[Category:模组制作]]
+ [[en:Scopes]]
