首页所有页面

作用域


Scopes are used in scripting to select entities in order to check for conditions or apply commands.

瞄准镜右侧总有一个支架块:

<scope_name> = {

    #Stuff to execute in the scope.

}

但并非所有括号区块都是作用域:有些是函数区块 (option, trigger, mean_time_to_happen,...), operators (AND), flow control statements (if, limit), or clause for complex conditions or commands (create_character, ...).

脚本可以创建十种类型的范围:角色、头衔/持有、省份、战争、围城/侧翼、单位、宗教、文化、社会和神器。还有一个特别节目 portrait scope used for portrait rendering rules.

Scopes can be nested (see scope chain),通常相对于调用作用域的函数,除了那些全局且可以从“任意”作用域调用的函数。

只有在作用域存在时,触发器和效果才会被评估和执行。这可以用于 always = yes 用来检查触发器中是否存在瞄准镜,或者是否有你只想执行的效果,比如角色的宗教有宗教领袖。

Note that the condition tooltips within any_ 范围具有误导性,只显示该范围内某个特定、看似随机选择的事物是否满足条件,因此即使该范围本身被评估为真,也可能显示某些条件是假的。 这些函数最好用 custom_tooltip.

Condition vs command scopes

在条件块中使用时,作用域允许检查该范围是否匹配任何实体:

trigger = {

    <scope_name> = {

	#Conditions to be met by at least one entity in the scope for the trigger to evaluate to true

    }

}

在命令块中使用时,作用域允许对该范围匹配的每个实体应用命令:

effect = {

    <scope_name> = {

	limit = { #Optional limit block (valid only for any_* and random_* scopes)

	    #Further conditions to filter entities matched by the scope

	}

	#Commands to apply each entity in the scope

    }

}

有些示波器只在条件块中工作(这种情况很少见),有些则只在生效命令块中工作(所有random_*范围)。

Count

any_ scopes can use count = N.对于条件范围,只有当至少N项匹配时,范围才会被评估为真。对于效果范围,范围最多执行N个项目(not randomized).

Limit

Preferred limit

random_ scopes (except for random_quest_target) allow for one or multiple preferred_limit blocks in addition to the regular limit.使用优选极限时,将先使用至少一个目标满足的极限,作为该极限的补充。如果没有满足任何优选限制,则只使用基础限制。当你想选择更好的目标时非常有用。

以下例子会给一个随机的独立挪威人,如果存在少于1000金币的话。如果没有,它会给一个金币少于1000的随机独立北日耳曼人。如果没有,它会给任何文化中一个金币少于1000金币的随机独立统治者。

random_independent_ruler = {

    limit = { wealth < 1000 }

    preferred_limit = { culture = norwegian }

    preferred_limit = { culture_group = north_germanic }

    wealth = 1000 

}

Score value

any_ 通过指定 a 来缩小范围至最高得分者 score_value system:

	

any_society_member = {

    score_value = {

        value = 1

        additive_modifier = {

            society_rank == 4

            value = 1000

        }

        additive_modifier = {

            society_rank == 3

            value = 100

        }

    }

    count = 3

    add_trait = maimed

}

如果分数并列,则只有1分(或 count从得分最高的项目中选出,但选择为 not randomized. Set of modifiers can be defined in common/scripted_score_values/ for reuse.

Quickcard

The most important scopes are shown in this quickcard:

Scopes modding quickcard.png

Legend:

  • (!) CPU heavy, use with care
  • (scope) deprecated variant, rarely used in vanilla
  • * coming in some next patch[1]

List of scopes

Character

Character 瞄准镜都是针对角色的瞄准镜。游戏中的大多数瞄准镜都是角色瞄准镜。“from scope”栏显示该项目可以调用的范围。

注意死字符很特殊:他们通常需要带后缀的瞄准镜 _even_if_dead to be scoped to (ex: father_even_if_dead,且有些瞄准镜在死角色瞄准镜内可能无法工作。

Scope Used in vanilla Description Trigger Effect From scope
c_%character_ID% 通过ID直接定位字符。例如,如果角色的ID为12345: c_12345 = { }

这通常没什么意义,因为新角色ID是随机生成的,但它可以用来脚本历史事件,针对历史中定义的角色,并带有预定义的ID。

Any
%trait_name% 在触发范围中,这会覆盖所有拥有特定特质的角色。在效果范围中,这个范围会针对一个拥有该特质的随机角色。给定的性状需要具备 flag cached = yes.
on_hajj = {

    NOR = {

	has_character_flag = hajj_arrived_in_mecca

	opinion = { who = ROOT value >= 0 }

    }

}

Warning: count = N doesn't work in this scope, as it's not an any_ scope.

Any
any_allied_character Scopes to all allies. Expensive calculation, use with care[2] Character
any_artifact_owner X Scopes to anyone who has ever owned the artifact包括现任所有者。对于具有 history = no parameter. Artifact
any_attacker Scopes to all attackers in a war War
any_backed_character Scopes to all characters whose plots a character is supporting Character
any_bloodline_member X Scopes to all members of the current bloodline Bloodline
any_character Scopes to all characters, except for offmap rulers. WARNING CPU HEAVY Any
any_child
any_child_even_if_dead
Scopes to all of a character's children Character
any_claimant Scopes to all claimants of a title Title
any_close_relative 该角色的所有近亲的视野范围。包括任何在其王朝中拥有“红血”图标的人(兄弟姐妹、子女、孙辈、父母、祖父母等),以及他们最亲近亲属的私生子。不包括配偶。 Character
any_courtier 范围允许与角色同场的所有人。注意,它会匹配囚犯(即使是外国)和议员(即使有陆地)。 Character
any_courtier_or_vassal

Primarily used to find minor title holders:

any_courtier_or_vassal = {

    has_minor_title = title_court_physician

    liege = { character = PREVPREV }

}

对于直接的臣民,包括海外的宫廷人员,你必须使用效率较低的any_character范围:

any_character = {

    independent = no

    liege = { character = PREVPREV }

}

Character
any_crusade_defender 所有在新风格防守中进行防守的角色都瞄Crusade Character
any_crusade_participant 所有以新型Crusade攻击的角色都请瞄准 Character
any_current_enemy 所有与某角色处于战争状态的角色都有视野。两个角色都必须直接参与战争,而不是 vassals Character
any_de_jure_vassal Scopes to all de jure vassals of a character or title. X[3] Character, title
any_defender Scopes to all defenders in a war War
any_dynasty_member
any_dynasty_member_even_if_dead
Scopes to all members of a character's dynasty. Character
any_elector_character Scopes to all electors of a title Title
any_enemy_plotter X 范围包括任何对该角色(已知或未知)策划该角色的阴谋 Character
any_faction_backer 范围给派系成员。派系字段可用于指定派系(例如: faction = faction_lower_tribal_organization).目前领导该派系的角色范围中使用。 Character
any_favor_holder X 所有角色欠人情的角色都获得了范围 Character
any_favor_ower 向所有欠该角色人情的角色发起任务 Character
any_friend Scopes to all of a character's friends Character
any_host_courtier 范围涵盖同一宫廷中的所有角色。简短版本 host = { any_courtier = { ... } } Any
any_independent_ruler Scopes to all independent rulers. Doesn't include ROOT.不包括叛乱;要包含它们,请使用更广泛的范围 limit = { liege = { character = PREV } }. Any
any_known_enemy_plotter X 范围指向任何已知角色与该角色密谋的对象 Character
any_known_plotter 范围指向任何被瞄准角色已知其阴谋的策划者 Character
any_kill_list_character Scopes to anyone in the character's kill list. Character
any_liege 所有领主都拥有范围,不管等级高多少。这包括 liege and top_liege scopes. If THIS is independent, scopes to nothing. Character
any_lover Scopes to all lovers a character has Character
any_neighbor_independent_ruler 所有与你所在领域相邻的独立统治者都有视野。 Character
any_non_aggression_pact_character 所有与某人签订互不侵犯协议的角色范围 X Character
any_opinion_modifier_target 所有角色都对有视角角色有意见修正
any_opinion_modifier_target = {

    limit = {

	reverse_has_opinion_modifier = {

	    who = PREV

	    modifier = opinion_spying_on

	}

    }

    reverse_remove_opinion = {

	who = PREV

	modifier = opinion_spying_on

    }

}

Character
any_playable_ruler Scopes to all playable rulers currently alive. Combined with limit = { ai = no }, it allows to broadcast events to human players. Any
any_player Scopes to all players. Any
any_plot_backer Scopes to everyone backing the character's plot Character
any_plotter 所有针对指定字符的绘图仪的范围,指定为 target = some_scope.
any_plotter = {

    target = ROOT

    limit = {

	OR = {

	    has_plot = plot_kill_character

	    has_plot = plot_kill_spouse

	}

    }

    character_event = { id = CM.6001 }

}

Character
any_pretender Scopes to all pretenders to the currently scoped title Title
any_previous_holder Scopes to previous holders of a title Title
any_province_character Scopes to all characters in the province Province
any_province_lord Scopes to all landed characters in the province Province
any_pupil Scopes to all characters that the scope is educating. Character
any_quester X Scopes to all characters with a quest. Any
any_quester_targeting_this 所有有当前任务针对当前范围的角色都发放瞄准镜。 Character, Title, Province
any_quest_target X 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 Any
any_realm_character 适用于当前角色或称号子领域内的所有角色。包括附庸和朝臣,但不包括王国的领主。比如 any_courtier, it does not include prisoners abroad. Character, title
any_realm_lord 对当前角色领域内所有已领地角色的视野。它不包括王国的领主。 Character
any_rival Scopes to all of a character's rivals Character
any_sibling
any_sibling_even_if_dead
Scopes to all of a character's siblings Character
any_society_member 该范围涵盖所有学会成员。注意:如果当前的范围不是社会,则将扩展到任何社会中的所有角色。 Society/Any
any_spouse
any_spouse_even_if_dead
Scopes to all of a character's spouses Character
any_consort 范围涵盖角色所有的妃子(不仅仅是妾室,男女皆适用) Character
any_suzerain Scopes to all suzerains of the scoped character X Character
any_tributary Scopes to all tributaries of the scope Character
any_unit_leader 单位范围内所有领导(侧翼或子单位)的范围(实际上只有子单位领导在实际范围中)。在角色范围中,使用该角色所在的单位。如果单位处于战斗状态,所有同方单位都被纳入战斗。 Character, Unit
any_unique_dynasty_vassal 不同王朝的附庸(不包括有范围性格的王朝)。 Character
any_unknown_enemy_plotter X 只能瞄准未知的敌方策划者,该角色的瞄准镜 Character
any_unknown_plotter 只有对被瞄准角色未知绘图者的示波器 Character
any_vassal 范围涵盖所有角色或头衔的直属附庸。不包括朝臣。要考虑所有附庸(直接或非直接)的范围 any_realm_character. Character, title
any_voter Scopes to all voters in a character's council Character
any_ward Scopes to all of a character's wards Character
artifact_owner Scopes to all the artifact's owner Artifact
attacker Scopes to the aggressor in a war War
band_creator Scopes to the creator of a dynamic mercenary band. Title
best_crusade_claimant 在crusade背景下,该头衔的最佳继承人范围 Title
best_fit_character_for_title 从角色的视角出发,应该获得一个指定称号。参数:标题、视角(我们从谁的视角观看标题)、索引(列表中角色的索引)
best_fit_character_for_title = {

    title = PREV 

    perspective = ROOT

    index = 1 

    grant_title = PREV

}

X Title
betrothed 范围指向当前被瞄准角色订婚的角色。 Character
biggest_realm_size_relative Scopes to relatives with biggest realm size. Character
center_flank_leader Scopes to the central flank leader of an army Army
left_flank_leader Scopes to the left flank leader of an army Army
right_flank_leader Scopes to the right flank leader of an army Army
consort 范围指向被对象角色的最新配偶,或配偶的高级方 Character
controller Scopes to the character controlling a barony. Rarely used, more generic scope owner being favored. Title (barony or county)
crusade_target_char 激活新样式Crusade锁定角色的范围 Any
crusader_beneficiary 当前角色选择的受益人范围Crusade Character
crusader_king Scopes to the recipient of a new-style Crusade Any CB effect clause
current_heir Scopes to the heir 该角色或标题的范围。在角色范围内,这个角色是继承主要头衔的角色,无论哪个王朝。 Character/Title
defender Scopes to the defender in a war War
dynasty_head Scopes to the head of the dynasty Character
educator 儿童教育者的范围(Conclave DLC教育) Character
employer 范围指向角色的雇主。这只适用于无地角色,因为有地主的君主被视为自己的雇主,即使他们在领主议会工作。 Character
enemy 围攻或战斗中敌方侧翼的瞄准镜 Siege
father
father_even_if_dead
Scopes to the character's father Character
father_of_unborn Scopes to the unborn child's father Character
founder Scopes to the founder of the current bloodline Bloodline
fort_owner 范围归属该省要塞所有者 Province
guardian Scopes to the child's guardian Character
governor 范围控制范围的地图外能力。范围可以是地图外的权力本身、地图外的权力统治者,或者州长头衔。 Offmap Power/Character/Title.
heir_under_primogeniture_law 如果实行长子继承制,将成为继承人的角色范围 Title
heir_under_seniority_law 如果实行资历继承,将成为继承人的角色范围 Title
heir_under_ultimogeniture_law X 如果实施终极继承制,将成为继承人的角色范围 Title
highest_ranked_relative Scopes to relatives with highest feudal tier Character
holder_scope Scopes to the owner of the province or title Title, province
hospital_owner X 范围归属指定省份医院所有者 Province
host 角色所在地的所有者的范围。这对有地和无地主角色都适用。如果角色居住在宫廷,主人就是主君。对于被囚禁的角色来说,这会带来他们的狱卒。 Character
job_chancellor Scopes to the character's current Chancellor, if they have one. Character
job_marshal Scopes to the character's current Marshal, if they have one. Character
job_treasurer Scopes to the character's current Steward, if they have one. Beware, it's "treasurer", not "steward"! Character
job_spymaster Scopes to the character's current Spymaster, if they have one. Character
job_spiritual Scopes to the character's current Chaplain, if they have one. Character
killer Scopes to the killer of a character Character
leader 围城中部队指挥官或战斗中侧翼(但非子单位)的瞄准镜 Siege/Flank
least_populous_clan_vassal(_except_me) X 范围是王国中人口最少的氏族。直接涉及氏族头衔的使用。 least_prestigious_clan(_except_me) Character
least_prestigious_clan_vassal(_except_me) X 对王国中声望最低的氏族进行了探测。直接涉及氏族头衔的使用。 least_prestigious_clan(_except_me) Character
liege Scopes to a character's direct liege Character
liege_before_war Scopes to whoever was the character's liege before his rebellion Character
lover Scopes to the character's lover Character
mercenary_employer Character
most_participating_attacker 瞄准战争中表现最多的攻击方 War
most_participating_crusader 瞄准在战争中表现最出色的非神权攻击者 [{{{1}}}] War
most_participating_defender 瞄准在战争中表现最多的防御方 War
most_popular_vassal 范围指向最受欢迎的附庸,满足其条件 limit 条款。似乎是用所有附庸(包括市长)的意见平均值。用于确定“罢黜统治者”的新统治者 faction is successful. X Character
most_populous_clan_vassal(_except_me) X 范围是王国人口最多的氏族。直接涉及氏族头衔的使用。 most_populous_clan(_except_me) Character
most_prestigious_clan_vassal(_except_me) X 向王国中声望最高的氏族提供范围。直接涉及氏族头衔的使用。 most_prestigious_clan(_except_me) Character
mother Scopes to the character's mother Character
mother_even_if_dead Scopes to the character's mother, even if she's dead Character
new_character 活动中之前创建角色的范围,如下 create_character or similar command. X Any
official_crusade_recipient 如果有新样式Crusade窗口,接收者的范围会显示。通常是主张人或现任头衔持有人。 Any
offmap_prev_ruler 瞄准镜对应前一个统治者的地图外力量。范围可以是地图外的权力本身、当前的地图外权力统治者、总督或总督头衔。 Offmap Power/Character/Title
offmap_ruler 范围对应范围的地图外强度。范围可以是地图外的权力本身、州长,或者州长头衔。 Offmap Power/Character/Title
original_artifact_owner
original_owner
向神器原始所有者发出望远镜。两个示波器功能相同。 Artifact
owner 省份、头衔或文物所有者的范围 Title, Province, Artifact
parent_religion_head 范围是母宗教的宗教领袖。非异端角色的范围变为零。 Character,Province
player_heir 范围是角色卡上列出的范围继承者(即如果你玩范围时,该范围死亡时你将扮演的角色),而不是该范围的主要头衔继承者。 Character
plot_target_char Scopes to the character that's being plotted against Character
preferred_war_target Scopes to the character's attack target Character
previous_artifact_owner X 视野指向神器的前任主人。对于具有 history = no parameter. Artifact
previous_owner X Scopes to the previous owner of the wonder. Wonder
quest_target 瞄准角色当前任务目标。可以是角色、省份或头衔,具体取决于任务。 Character
random_allied_character Scopes to an ally X Character
random_artifact_owner X 来自曾经拥有过 artifact包括现任所有者。对于具有 history = no parameter. X Artifact
random_backed_character 瞄准镜指向角色支持的随机角色。不能用作触发点 X Character
random_bloodline_member X Scopes to a random member of the current bloodline ? ? Bloodline
random_character 在游戏中随机瞄准一个角色,不包括地图外的统治者。不能用作触发点。注意:该作用波不对 ROOT. X Any
random_child
random_child_even_if_dead
视野指向角色的随机子嗣。不能用作触发点 X Character
random_close_relative Scopes to a random close relative of the character. X Character
random_courtier 镜头指向角色的随机朝臣,包括囚犯。不能用作触发点。 X Character
random_courtier_or_vassal 视角指向角色的随机朝臣或附庸。不能用作触发点。 X Character
random_crusade_defender Scopes to a random defender in a new-style Crusade X Character
random_crusade_participant Scopes to a random attacker in a new-style Crusade X Character
random_current_enemy 瞄准角色的随机敌人。两个角色都必须直接参与战争,而不是作为附庸。 X Character
random_dynasty_member
random_dynasty_member_even_if_dead
Scopes to a random member of the character's dynasty. X Character
random_elector_character X Scopes to a random elector of the scoped title X Title
random_enemy_plotter X X Character
random_friend Scopes to a random friend of the character. X Character
random_host_courtier 瞄准同一宫廷中的一个随机角色。简短版本 host = { random_courtier = { ... } } X Any
random_independent_ruler Scopes to a random independent ruler. Doesn't include ROOT. X Any
random_known_enemy_plotter X X Character
random_lover Scopes to a random lover. X Character
random_neighbor_independent_ruler 视野指向一个与你所在领域相邻的随机独立统治者。 X Character
random_non_aggression_pact_character 范围指向一个与当前角色签订非侵略协议的随机角色。 X Character
random_opinion_modifier_target 对一个随机角色的视角,带有对有视角角色的意见修正 X Character
random_playable_ruler Scopes to a random playable ruler. X Any
random_player Scopes to a random player. X Any
random_pretender 范围指向当前范围的某个随机冒牌者。 X Title
random_province_character Scopes to a random character in the province. X Province
random_province_lord Scopes to a random landed character in the province. X Province
random_pupil 瞄准镜中正在教育的随机角色。 X Character
random_quester X Scopes to a random character with a quest. X Any
random_quester_targetting_this X 瞄准镜给一个随机角色,任务针对当前瞄准镜。 X Character, Title, Province
random_quest_target 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 X Any
random_realm_character 瞄准角色或标题领域内的随机角色。 X Character, title
random_realm_lord 瞄准角色或称号领域内的随机降落角色。 X Character, title
random_rival Scopes to a random rival of the character. X Character
random_sibling
random_sibling_even_if_dead
Scopes to a random sibling of the character. X Character
random_society_member 视野指向社会中的随机成员。注意:如果当前的范围不是社会,则将范围为任何社会中的随机角色。 X Society/Any
random_spouse
random_spouse_even_if_dead
Scopes to a random spouse of the character. X Character
random_consort 范围是角色的随机配偶(不仅仅是妾室,男女皆适用)。 X Character
random_tributary X Scopes to all tributaries of the scope X Character
random_unit_leader 单位范围中随机指挥官(侧翼或子单位)的瞄准镜。角色内使用该角色所在的单位。如果单位处于战斗状态,所有同方单位都被纳入战斗。 X Character, Unit
random_unknown_enemy_plotter X X Character
random_vassal 范围指向角色或头衔的某个随机附庸。 X Character, title
random_voter X Scopes to a random voter on the council X Character
random_ward Scopes to a random ward of the character. X Character
real_father
real_father_even_if_dead
如果角色已知的父亲不是他们的亲生父母,则可以指向角色的亲生父亲。 即使戴绿帽的事实未知,这也会选择遗传父母。 如果角色已知的父亲是他们的亲生父亲,则没有任何结果。 参见 true_father or true_father_even_if_dead 如果你愿意每次都归还真正的父亲。 Character
reincarnation_scope 当前作用范围角色的范围是 的转世 Character
regent Scopes to the character's regent Character
religion_head Scopes to the character's religious head(s). Does NOT includes antipopes Character/Province
rightful_religious_head_scope Scopes to the character's rightful religious head. Includes antipopes Character
ruler Scopes to the province's owner. Rarely used, owner being preferred. Province
spouse Scopes to the character's primary spouse Character
spouse_even_if_dead Scopes to the character's primary spouse, even if dead Character
strongest_clan_vassal(_except_me) 向王国中军事实力最强的氏族致敬。直接涉及氏族头衔的使用。 strongest_clan(_except_me) Character
supported_claimant Character
suzerain Scopes to the suzerain of a tributary character Character
title_to_get_rid_of Scopes to titles over the demesne limit Title
top_liege Scopes to a character's independent liege. Includes ROOT if independent. Character
trade_post_owner Scopes to the owner of the trade post Province, Title
true_father X 如果有的话,是real_father范围;否则就归入父亲。 Character
true_father_even_if_dead X Character
twin X 瞄准角色的双胞胎。警告:如果模组增加了额外的双胞胎(三胞胎等),这些瞄准镜可能会产生不可预测的结果。 Character
twin_even_if_dead X Character
weakest_clan_vassal(_except_me) X 视角指向王国军事实力最小的氏族。直接涉及氏族头衔的使用。 weakest_clan(_except_me) Character

Title

Title scopes are all scopes that target titles.

Title scopes of baron tier are also referred as holding scopes某些触发/命令只在持牌时生效(例如,add_building)。

额外的领地(贸易站、医院和堡垒)没有相应的领地/头衔范围,而是由其母省的范围管理[4].

“from scope”栏显示该项目可以调用的范围。

Scope Used in vanilla Description Trigger Effect From scope
%title_ID% 根据标题的标识范围(以b_、c_、d_、k_或e_开头)。

For instance: e_byzantium = { }

Any
%faction_ID% 适用于被设定角色所属派系的主题标题(如适用) Character
any_claim Scopes to all titles a character has claims upon Character
any_defacto_liege 涵盖de facto角色或称号的所有领主头衔。在角色效果范围中不起作用。 Character, Title
any_dejure_liege 涵盖de jure角色或称号的所有领主头衔。在角色效果范围中不起作用。 Character, Title
any_de_jure_liege_title 涵盖de jure角色或称号的所有领主头衔。 X Character, Title
any_de_jure_vassal_title 适用于所有属于角色或头衔领域的头衔 ✓ (2.5) Character, Title
any_direct_de_jure_vassal_title 涵盖所有法定属于该爵位领域的头衔范围 Title
any_demesne_title Scopes to all titles a character holds Character
any_eldership_title 所有使用长老继承权的头衔范围,均由被瞄准的角色持有 Character
any_feud_rival_clan 在与当前有范围的氏族头衔争斗中,所有氏族头衔的范围 Title
any_heir_title 该角色目前继承的所有头衔范围 X Character
any_landed_title Scopes to all landed titles. Warning CPU HEAVY Any
any_mercenary_band Scopes to all mercenary bands Any
any_potential_tribal_county X Character
any_pretender_title Scopes to all titles held by pretenders Character, title
any_province_holding Scopes to all holdings of a province* Province
any_quest_target X 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 Any
any_realm_title 角色或称号领域内所有标题的范围 X Character
any_title Scopes to all titles X Any
any_title_under 涵盖其所控制角色或多个角色所持有的所有头衔范围 X Character
blood_brother Character
capital_holding 范围延伸到角色的首都持有头衔。注意:这与不同 capital_scope which scopes to the capital province. Character, province
clan_title Scopes to the clan of a nomad. Character
county 男爵领所在县的范围,或从省份到对应的县名称的范围 Province, Title (barony only)
crownlaw_title 赋予角色或头衔王权法律的权威范围 Character, title
crusade_target 瞄准目标,持续crusade角色 religion Character
crusade_target_title Scopes to the target of the ongoing new-style Crusade Any
defacto_liege_title 标题范围 de facto 属于的标题 Title
dejure_liege_title 角色或de jure所属标题的范围 Character, title
duchy 该省份所属的公国范围。(从县范围中,你必须使用 dejure_liege_title instead) Province
empire Scopes to the empire a title belongs to Province, Title (any except empires)
family_palace Scopes to the family palace title of a patrician. Character
governor_title X 范围与州长头衔有关。范围可以是地图外的力量本身、地图外的力量统治者,或者是州长。 Offmap Power/Character
invasion_target X
kingdom Scopes to the kingdom a title belongs to Province, Title (duchy or below)
least_populous_clan(_except_me) X 范围是王国中人口最少的氏族。直接将使用范围扩大到产权持有人 least_populous_clan_vassal(_except_me) Character
least_prestigious_clan(_except_me) X 对王国中声望最低的氏族进行了探测。直接将使用范围扩大到产权持有人 least_prestigious_clan_vassal(_except_me) Character
most_populous_clan(_except_me) X 范围是王国人口最多的氏族。直接将使用范围扩大到产权持有人 most_populous_clan_vassal(_except_me) Character
most_prestigious_clan(_except_me) 向王国中声望最高的氏族提供范围。直接将使用范围扩大到产权持有人 most_prestigious_clan_vassal(_except_me) Character
new_title 对之前在同一范围内创建的标题的范围 create_title command. X Any
plot_target_title 角色密谋对抗角色的标题范围 Character
primary_title Scopes to the character's primary title Character
quest_target 瞄准角色当前任务目标。可以是角色、省份或头衔,具体取决于任务。 Character
random_claim 范围指向角色拥有主张的随机称号。 X Character
random_demesne_title Scopes to a random title the character holds. X Character
random_direct_de_jure_vassal_title 范围指向一个合法属于该范围的随机标题 X Title
random_eldership_title Scopes to a random held title using Eldership succession X Character
random_landed_title Scopes to a random landed title X Any
random_potential_tribal_county Scopes to a county suitable for tribal takeover X Character
random_province_holding Scopes to a random holding of a province X Province
random_quest_target X 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 X Any
random_realm_title Scopes to a random title in realm. X Character
realm 对角色或头衔所属的独立领域有影响。它相当于 top_liege for titles. Character, title
strongest_clan(_except_me) 向王国中军事实力最强的氏族致敬。直接将使用范围扩大到产权持有人 strongest_clan_vassal(_except_me) Character
succ_law_title Scopes to a title where has_law trigger can be used to check succession law. Title
supported_claimant_title 被瞄准角色声称派系主张者标题的范围 Character
thirdparty_title_scope 只有在第三方所有权涉及战争时才有效 War
weakest_clan(_except_me) X 视角指向王国军事实力最小的氏族。直接将使用范围扩大到产权持有人 weakest_clan_vassal(_except_me) Character

Province

Province scopes are all scopes that target provinces.

额外的领地(贸易站、医院和堡垒)通过省份范围锁定,使用带有额外领地名称的条件/命令(has_fort, fort_has_building, etc.)[5]

“from scope”栏显示该项目可以调用的范围。

Scope Used in vanilla Description Trigger Effect From scope
%province_ID% 根据省份的ID(编号从1到(max_provinces - 1)进行范围,其中max_provinces编码在map/default.map中。

For instance: 290 = { # Uppland }

Any
any_connected_province 覆盖该省份所关联的目标子领域内所有省份。参数与 is_connected_to trigger, except for target. ? ? Province
any_demesne_province Scopes to all provinces in a character's demesne. ✓ (v2.6.1) Character
any_disconnected_province 范围涵盖目标子领域内所有与该省份无关的省份。参数与 is_connected_to trigger, except for target. Province
any_neighbor_province Scopes to all border provinces, including sea tiles. Province
any_province Scopes to all provinces. WARNING CPU HEAVY Any
any_fort X 角色拥有堡垒的所有省份范围 Character
any_hospital X 涵盖角色拥有医院的所有省份 Character
any_quest_target X 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 Any
any_realm_province 角色或头衔领域内所有省份的范围 Character, title
any_trade_post 角色拥有贸易站的所有省份范围 Character
any_trade_route_province Scopes to all provinces on a trade route Province
capital_scope 对该角色(或称谓,如果landed_titles定义中已定义首都)首府省份的范围 Character, Title
location 角色所在地(或郡、男爵头衔所在省份)的范围 Character, title, unit
plot_target_province 角色剧情目标省份的范围 Character
quest_target 瞄准角色当前任务目标。可以是角色、省份或头衔,具体取决于任务。 Character
random_connected_province X 将视野指向与该省份相连的目标子领域中的一个随机省份。参数与 is_connected_to trigger, except for target. X Province
random_demesne_province Scopes to a random province in the character's demesne. X Character
random_disconnected_province 将视野指向目标子领域内一个与该省份无关的随机省份。参数与 is_connected_to trigger, except for target. X Province
random_fort X 对角色拥有堡垒的某个省份进行视角 X Character
random_hospital X 视角指向角色拥有医院的随机省份 X Character
random_neighbor_province Scopes to a random bordering province. Unlike any_neighbor_province, this does NOT scope to sea tiles! X Province
random_province Scopes to a random province province X Any
random_quest_target 所有任务目标角色、省份和头衔的范围。请注意,脚本应该能够处理这三种类型,或者在极限内过滤目标类型。 X Any
random_realm_province 将视角指向角色或称号领域内的某个省份。 X Character, title
random_trade_post 角色拥有贸易站的随机省份范围 X Character
sea_zone 范围涵盖当前范围所在省份的所有海域省份 Province

Offmap power

地图外的功率范围允许对特定地图外国家进行瞄准,比如中国。

Scope Used in vanilla Description Trigger Effect From scope
%offmap_name% Direct scoping to the offmap power by name. Any
offmap_power 瞄准镜对应示波器的地图外功率。范围可以是地图外的权力统治者、总督或总督头衔。 Character/Title

War

战争范围允许将视角视为持续中的战争。 战争范围中可用的触发器和效果非常少(using_cb , war_score, war_title, end_war, days_since_last_hostile_action).

Scope Used in vanilla Description Trigger Effect From scope
any_war 角色作为活跃成员参与的任何战争范围;领主参与不算数。

在称号范围中使用时,会检查所有该称号的战争。

Character, Title

Siege/Flank

围攻(或侧翼)瞄准镜允许瞄准正在进行的战斗。它们不同于单位瞄准镜。

Scope Used in vanilla Description Trigger Effect From scope
siege Scopes to the siege the character is participating in Character
combat 瞄准角色所领导的侧翼,作为主要领导者或子单位领导者[6] Character

Unit

单位范围允许将范围扩展到一支军队(非战斗/围城)或舰队。在原版中很少使用,而且在这些领域中有效的触发或效果非常少(loot, set_looting, set_can_toggle_looting).

Scope Used in vanilla Description Trigger Effect From scope
any_army Scopes to all armies belonging to the character. Character
any_controlled_unit X Scopes to all units controlled by the character (?). Character
any_fleet X Scopes to all fleet belonging to the character. Character
any_unit X Scopes to all units belonging to the character. Character
random_army X Scopes to an armies belonging to the character. X Character
random_controlled_unit X Scopes to a unit controlled by the character (?). X Character
random_fleet X Scopes to a fleet belonging to the character. X Character
random_unit X Scopes to a unit belonging to the character. X Character

Religion

Scope Used in vanilla Description Trigger Effect From scope
%religion_name% 根据名称,可以视为宗教。也可以用于宗教团体,在这种情况下,它指的是该群体中的第一个宗教。

For instance: catholic = { }

Any
crusade_religion_targeting_us 新式宗教的范围Crusade针对当前范围 Character/Title/Society
parent_religion Scopes to the parent religion of the current scope. Character/Province/Religion/Society/Title
religion_scope Scopes to the religion of the current scope. Character/Province/Society
secret_religion_scope Scopes to the secret religion of the character. Character
true_religion_scope Scopes to the true religion of the character. Character

注意:大多数在宗教范围中有效的范围/命令/条件也可以在角色范围内使用

Culture

Scope Used in vanilla Description Trigger Effect From scope
%culture_name% X 根据文化名称来定位。也可以用于文化群,在这种情况下,它的作用范围是该群中的第一个文化。

For instance: norse = { }

Any
culture_scope Scopes to the culture of the character or province. Character/Province
gfx_culture_scope Scopes to the culturegfx of the character. Character

Society

Scope Used in vanilla Description Trigger Effect From scope
%society_name% 根据名称静态地定位社会范围。示例: the_satanists = { }. Any
secret_religious_cult 视角指向角色真实宗教的秘密宗教教派,或该教派的秘密宗教教派。 Character/Province/Religion
society 角色所属社会的范围 Character

Artifact

Scope Used in vanilla Description Trigger Effect From scope
any_artifact Scopes to any artifact. Used within character scope. Character
new_artifact Scopes to the artifact just created using add_artifact. X Character
random_artifact Scopes to a random artifact. Used within character scope. X Character

Bloodline

Scope Used in vanilla Description Trigger Effect From scope
any_bloodline Scopes to any created bloodline Any
any_owned_bloodline Scopes to any bloodline owned by the character Character
new_bloodline Scopes to the newly created bloodline X Character
random_bloodline X Scopes to a random created bloodline Any
random_owned_bloodline Scopes to any bloodline owned by the character X Character

Wonder

Scope Used in vanilla Description Trigger Effect From scope
any_demesne_wonder 可以观察你个人领地内任何存在(或已开始建设)的奇观 Character
any_demesne_wonder_upgrade X 可以瞄准你个人领地内任何存在(或已开始建设)的奇迹升级。 Character
any_previous_wonder_owner X Scopes to any character who previously owned this wonder. Wonder
any_realm_wonder 对你领域内任何存在(或已开始建设)的奇迹的视角 Character
any_realm_wonder_upgrade 对你领域内任何存在(或已开始建设)的奇迹升级进行瞄准镜。 Character
any_upgrade_on_wonder Scopes to any upgrade (completed or uncompleted) on wonder Wonder
any_wonder 可以俯瞰世界上任何存在(或已开始建设)的奇迹 Any
any_wonder_owner X Scopes to any character who owns a wonder. Any
any_wonder_upgrade 可以瞄准世界上任何存在(或已开始建造)的奇迹升级。 Any
location Scopes to the province of the wonder. Wonder or wonder upgrade
original_wonder_owner 瞄准了放置奇迹第一块石头的角色(原始创造者/起始者)。从奇迹视角看。 Wonder
previous_wonder_owner X 视角指向曾经拥有奇迹的角色。 Wonder
random_demesne_wonder 视野指向被瞄准角色拥有的省份中的一个随机奇观 X Character
random_demesne_wonder_upgrade X 可以瞄准你个人领地内一个存在(或已开始建设)的随机奇观升级。 X Character
random_previous_wonder_owner X 瞄准一个之前拥有这个奇观的随机角色。 X Wonder
random_realm_wonder 瞄准镜,指向被瞄准角色领域中的一个随机奇观 X Character
random_realm_wonder_upgrade 瞄准一个存在(或已开始建设)在你领域内的随机奇观升级。 X Character
random_upgrade_on_wonder X 瞄准镜,指向瞄准奇观上的随机升级(已完成或未完成) X Wonder
random_wonder 望向世界上一个随机的奇观,这个奇迹存在(或已经开始建造) X Any
random_wonder_owner X Scopes to a random character who owns a wonder. X Any
random_wonder_upgrade X 对世界中存在(或已开始建设)的随机奇观升级进行瞄准。 X Any
wonder Scopes to the parent wonder Wonder upgrade, Province
wonder_owner 瞄准目前是奇观最高领主(拥有者)的角色。 Wonder

References

相关页面 (83)

ArtifactBaronyChancellorChaplainCharacterClaimsCommandsConditionsDe jureDynastyEU4转档器模组制作FactionHeirMarshalMinor titleOperatorPlotsPortrait scopeProvinceRebellionRegentReligionReligious headScriptingSpousesSpymasterSteam创意工坊StewardTrait moddingVassalsWarWards事件模组制作修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件