王国风云2
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问王国风云2百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“条件”的源代码
←
条件
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{version|2.8}} '''Conditions''' or '''Triggers''' are used in [[scripting]] to restrict events and [[commands]] to correct targets. They appear: *In condition blocks (''trigger'' section of [[Event modding|events]], or equivalent: modifier, can_use_title, potential, allow, ...) *In the ''limit'' clause of command blocks *In [[scripted trigger]]s, which can be used to group conditions into re-usable macro. *At the root of events for [[pre-trigger]]s used to improve performances Syntax for most conditions accepting numeric values was extended with [[Scripting#Numeric_operators|Numeric Operators]] since version 2.8. ==List of conditions== Available conditions depend on the current [[scope]] type. {|class="wikitable sortable" !Condition !Used in vanilla !Used from scope !Value type !Description !Example !Category |- |adventurer !✓ |title |bool |Checks adventurer flag of the title (title that gets destroyed whenever the holder gains another title or when the holder dies). |adventurer = yes |Titles |- |age !✓ |character |int |The age of a character. Can be any whole number. | |Characters |- |age_diff !✓ |character |clause |The ''absolute value'' of the age difference between two characters. Typically used in conjunction with <code>is_older_than</code>. |age_diff = {who = PREV years = 25} |Characters |- |ai !✓ |character |bool | *If yes, will only fire for ai characters. *If no, will only fire for the player(s). Can also be used as an event [[pre-trigger]]. | |Characters |- |ai_ambition !✓ |character |int |rowspan=5 | Check an [[Modifiers#AI behavior|AI behavior modifier]] (based on [[traits]]) |ai_ambition = 0 |Characters |- |ai_greed !X |character |int | |Characters |- |ai_honor !✓ |character |int | |Characters |- |ai_rationality !X |character |int | |Characters |- |ai_zeal !X |character |int | |Characters |- |always !✓ |any |bool |Can be used to fail the conditions, without needing to comment/delete the code. Also used to use [[scopes]] as boolean conditions, with pattern: <pre> NOT = { some_scope = { always = yes } } </pre> If the scope matches nothing, then conditions fails. | |Control |- |among_most_powerful_vassals !✓ |character |int |Checks if the character is among the nth most powerful vassals of the realm. It compares the character's powerbase with that of all other direct vassals of the same liege. Also see <code>is_powerful_vassal</code> and <code>relative_power</code>. Does not permit the use of 2.8+ comparison operators! |<code>among_most_powerful_vassals = 5</code> |Realm |- |artifact !✓ |artifact |artifact |(2.8) Checks to see if the scoped artifact is the same as the target artifact. |artifact = PREV |Control |- |artifact_age !✓ |artifact |int |(2.8) Checks to see if the artifact is older than the specified value. Can use comparison operators (<nowiki><, <=, >=, ==</nowiki>). Always returns false if the artifact has no known creation date. |artifact_age > 10 |Control |- |artifact_can_be_gifted_to !X |artifact |character |(2.8) Checks if the scoped artifact can be gifted to the target character. |artifact_can_be_gifted_to = ROOT |Artifacts |- |artifact_type !✓ |artifact |artifact type |Checks if the scoped artifact is of the given type |<code>artifact_type = golden_platypus</code> |Artifacts |- |artifact_type_owned_by !✓ |artifact |character |Checks if the given character owns at least one instance of the scoped artifact. |<code>artifact_type_owned_by = ROOT</code> |Artifacts |- |attribute_diff !✓ |character |clause |Checks that currently scoped character has at least ''value'' more points in the given ''attribute'', than target character. | <pre> attribute_diff = { character = FROM attribute = martial value = 9 } </pre> |Characters |- |at_location !✓ |character |character/province |Checks if two characters are in the same location |any_courtier = { at_location = ROOT } NOT = { at_location = 719 } |Provinces |- |base_health !✓ |character |double |Checks for hidden attribute base [[health]] |base_health = 6 |Health |- |bloodline !X |bloodline |bloodline |Returns true if the current scope <bloodline> is the exact same bloodline as the RHS scope <bloodline>. Note that this compares bloodlines, not bloodline types. | |Bloodlines |- |bloodline_is_active_for !✓ |bloodline |character |Returns true if current scope <bloodline> is active for <character> on right-hand side. | |Bloodlines |- |borders_lake !✓ |province |bool |Province borders a lake |borders_lake = yes |Provinces |- |borders_major_river !✓ |province |bool |Province borders a major river |borders_major_river = yes |Provinces |- |calc_true_if !X |any |clause |Returns true if at least amount of the triggers in it return true.<ref>[[Forum:774248]]</ref> |In this example at least 3 of the 5 triggers need to return true: <pre> calc_true_if = { amount = 3 culture = swedish religion = catholic is_female = no is_adult = yes age = 50 } </pre> |Control |- |can_be_given_away !✓ |title |bool |The title is not occupied, has no holdings being sieged, or contested in war.<br><br>The title is not a capital settlement. (Normally, you'd give it away by giving away the county.) |any_demesne_title = { can_be_given_away = yes } |Titles |- |can_change_religion !✓ |character |bool | |can_change_religion = yes |Religion |- |can_call_crusade !✓ |character |bool |Crusades have been unlocked |can_call_crusade = yes |Religion |- |can_copy_personality_trait_from !✓ |character |character | |ROOT = { can_copy_personality_trait_from = PREV } |Traits |- |can_land_path_to !✓ |province |province/clause |Checks if it is possible to travel by land between two provinces. Can be expanded to also take a <code>distance</code> parameter. |<pre>can_land_path_to = { target = event_target:home_capital distance < 1000 }</pre> |Provinces |- |can_naval_path_to !✓ |province |province/clause |Checks if it is possible to travel by sea between two provinces. Both provinces have to be sea or coastal. Can be expanded to also take a <code>distance</code> parameter. |<pre>can_naval_path_to = c_london</pre> <pre>can_naval_path_to = { target = c_london distance < 100 }</pre> |Provinces |- |can_have_more_leadership_traits !✓ |character |bool |Checks the limit of leadership trait based on martial education trait (<code>leadership_traits = N</code>) | |Traits |- |can_hold_title !✓ |character |jobTitle/minorTitle |Checks the conditions for the specified councillor position or minor title. |<code>can_hold_title = job_marshal</code> <code>can_hold_title = title_commander</code> |Characters |- |can_join_society !✓ |character |society |Checks if scope character can join the specified society. |<code>can_join_society = monastic_order_orthodox</code> |Societies |- |can_marry !✓ |character |bool/character |False if the character has any traits with <code>cannot_marry = yes</code>, rules a theocracy of a religion that prohibits priest marriages, or is a member of a holy order. Also false for characters who are married (even if their religion allows polygamy!) or betrothed. | <pre> AND = { can_marry = yes is_marriage_adult = yes } </pre> |Marriage |- |can_see_secret_religion !X |character |character |Checks if the character scope you're currently in can see the target character's secret religion. | |Religion |- |can_swap_job_title !✓ |character |character |Checks if a character can get the job position of another character | <pre> job_chancellor = { NOT = { character = ROOT } can_swap_job_title = ROOT } </pre> | |- |can_use_cb !✓ |character |clause |(2.8) Checks if the specified casus belli would show up and be usable in the UI. Checks everything in the CB itself, plus the extra hardcoded restrictions on regular war declarations. {|class="wikitable" !Parameter !! Type !! Description |- |target || character/title || Required. What character or title to target. |- |casus_belli || CB || Required. What CB to use. |- |thirdparty_title || title || Optional. What title to target, if relevant. |- |thirdparty || character || Optional. What character to declare war on the behalf of, if relevant. |- |only_check_triggers || boolean || Required. |- |} |<pre>can_use_cb = { target = d_mecklemburg casus_belli = religious thirdparty_title = d_mecklemburg only_check_triggers = yes }</pre> |Wars |- |character !✓ |character |character/title/int |Checks if 2 characters are the same. |<pre> any_dynasty_member = { limit = { NOT = { character = ROOT } } } </pre> <code>character = 1234</code> |Characters |- |check_variable !✓ |character/province |clause |Used in conjunction with change_variable command. | <pre> check_variable = { which = "bob_saget" value = 4.5 } </pre> |Control |- |claimed_by !✓ |title |character | |any_demesne_title = { claimed_by = ROOT } |Claims |- |clan !✓ |character,title |bool |Whether character is the head of a nomadic clan, or title is a nomadic clan. |<pre> any_vassal = { clan = yes }</pre> |Clans |- |clan_opinion !✓ |character |clause | |clan_opinion = { who = FROM value = 0 } |Opinion |- |combat_rating !✓ |character |int |Checks combat rating [[modifier]] |combat_rating = 0 |Character |- |climate !X |province |winter_type |Check whether a province has a winter climate defined in /map/climate.txt - does NOT check whether province is ''currently'' experiencing a winter, use <code>is_winter</code> for that. Note that you can only check for winter types (mild_winter, normal_winter, sever_winter), and not for "temperate" climate; but obviously any province that does not have a winter climate is temperate. |<code>climate = severe_winter</code> |Provinces |- |combat_rating_diff !✓ |character |clause |Tests combat rating modifier difference with another character | <pre> combat_rating_diff = { character = FROM value = 3 } </pre> |Character |- |completely_controls !✓ |character |title |Character controls (personally or via a vassal) all the baronies under specified title. Notes: *the title itself doesn't need to exist. *completely_controls is true if title name is invalid. | |Rulers |- |completely_controls_region !✓ |character |region |Similar to <code>completely_controls</code> |completely_controls_region = world_steppe |Rulers |- |conquest_culture !✓ |title |bool/character |If yes, only fires if conquest_culture is set (?). Certain CBs set Conquest_Culture (used for cultural conversion events) | |Culture |- |continent !X |province |continent | |Replaced by more flexible <code>region</code> trigger |Provinces |- |controlled_by !✓ |title/province |character/title |Checks if province/holding is occupied (war) by another character/realm |any_demesne_province = { controlled_by = ROOT } |Wars |- |controls_religion !✓ |character/title |bool |If yes, only picks characters who are the head of their religion (holder of a title with a flag <code>controls_religion = <religion></code>) |<pre>religion = catholic controls_religion = yes</pre> |Religion |- |could_be_parent_of !✓ |character |character |(2.8) Checks if the scoped character is old enough to be the target character's parent. This means that they're at least AGE_OF_MARRIAGE_MALE years older, and at most MAX_CHILD_BIRTH_AGE years older if female (for immortal characters, as long as they became immortal before this age they bypass the check). It also checks that they didn't die before the birth date of the target. |could_be_parent_of = event_target:displaced_prince |Characters |- |count !✓ | |int |Number of elements matched by a scope. Since [[patch 2.3]] works with all any_ scopes. | <pre> any_spouse_even_if_dead = { count = 3 } </pre> |Control |- |culture !✓ |character/province/title |culture/character/province/title |Checks if the character has this specific culture | |Culture |- |culture_group !✓ |character/province/title |cultureGroup/character/province/title |Checks if the character is part of this culture group | |Culture |- |day_of_birth !✓ |character |int |Checks if the day of the character's date of birth is at least this number. |day_of_birth = 18 |Characters |- |days_at_current_society_rank !✓ |character |int |Checks if scope character has been at current rank in society for the given number of days. |days_at_current_society_rank >= 1095 |Societies |- |days_in_society !✓ |character |int |Checks if scope character has been in a society for the given number of days |days_in_society > 365 |Societies |- |days_since_policy_change !✓ |offmap |int |True if the specified number of days has passed since the last policy change of the scoped offmap power. Accepts comparison operators. |<code>NOT = { days_since_policy_change = 10950 } #30 years</code> |Offmap |- |days_since_status_change !X |offmap |int |True if the specified number of days has passed since the last status change of the scoped offmap power. Accepts comparison operators. |days_since_status_change > 1 |Offmap |- |defending_against_claimant !✓ |character |clause | |defending_against_claimant = { character = PREVPREV title = ROOT } |Wars |- |demesne_efficiency !X |character |double | | |Rulers |- |demesne_garrison_size !✓ |character |int | |demesne_garrison_size = 500 |Warfare |- |demesne_size !✓ |character |int |Checks if the character has a minimum of this demesne size | |Rulers |- |demesne_size_compared_to_limit !✓ |character |double |(2.8) Checks if the character's demesne size is proportional to the floating point percentage specified. Can use comparison operators (<nowiki>=, <, <=, >, >=, ==</nowiki>). |<code>demesne_size_compared_to_limit < 1</code> |Rulers |- |de_facto_liege !✓ |character/title/province |character/title | |<code>ROOT = { de_facto_liege = ROOT }</code> |Vassalage |- |de_facto_liege_title !✓ |character/title |character/title |Checks that the defacto liege title of a character or title is the right-hand side. |ROOT = { de_facto_liege_title = e_hre } |Vassalage |- |de_jure_liege !✓ |character/title/province |character/title |Checks whether current scope is a direct de jure vassal of right hand side scope. |<code>de_jure_liege = e_rajastan</code> |Vassalage |- |de_jure_liege_or_above !✓ |character/title/province |character/title |Checks whether current scope is a de jure vassal of right hand side scope. |<code>de_jure_liege_or_above = FROM</code> |Vassalage |- |de_jure_vassal_or_below !✓ |character/title |character/title |Checks whether current scope is a de jure liege of right hand side scope. |<code>crusade_target = { de_jure_vassal_or_below = FROM }</code> |Vassalage |- |death_reason !✓ |character |deathReason | |<code>death_reason = death_murder</code> |Health |- |decadence !✓ |character |double | |decadence = 90 |Characters |- |disease !✓ |province |disease |Checks if the province has the specified disease. |disease = bubonic_plague |Provinces |- |disease_defence !X |province |int (?) |Checks if the province has at least the specified disease defence modifier. | |Provinces |- |disliked_by_offmap !✓ |character |clause |Checks whether the scoped character matches the current "dislike" of the offmap power of the specified ''type''. If the "dislike" trigger has a context, the ''context'' parameter must match to return true. If the "dislike" trigger has no context, the context parameter must be omitted to return true. |<code>disliked_by_offmap = { type = offmap_china context = eunuch }</code> |Offmap |- |difficulty !X |any |int/string |The game difficulty | |Control |- |diplomacy !✓ |character |int |The character's Diplomacy attribute. For state value, see <code>realm_diplomacy</code> | |Characters |- |diplomatic_immunity !✓ |character |bool |Checks if character has the diplomatic_immunity flag, protecting him from hostile actions. | |Characters |- |dislike_tribal_organization !✓ |character/title |bool |Checks for dislike_tribal_organization religion flag |<code>dislike_tribal_organization = no</code> |Religion |- |distance !✓ |character/province |clause |Determines the minimum [[distance]] from the scope. If used with NOT, it becomes maximum distance. Distances are pixels within the main map images & positions.txt |<code>distance = { who = ROOT value = 100 }</code> |Provinces |- |distance_from_realm !✓ |character |clause | |<code>distance_from_realm = { who = FROM value = 20 }</code> |Provinces |- |dynastic_prestige !X |character |int |Checks if the character's dynasty has a dynastic prestige of at least this amount. |dynastic_prestige = 100 |Family |- |dynasty !✓ |character |character/int/no/none |The character's dynasty, indexed by an integer value. Lowborn (no dynasty) match ''none'' or ''no'' value. |dynasty = none<br/> dynasty = ROOT |Family |- |dynasty_realm_power !✓ |character |double | |<code>top_liege = { dynasty_realm_power = 0.25 }</code> |Family |- |excommunicated_for !✓ |character |character | |<code>top_liege = { excommunicated_for = ROOT }</code> |Religion |- |faction_exists !X |character |clause | |<code>faction_exists = { faction = xxx title = xxx thirdparty = xxx}</code> |Factions |- |faction_power !✓ |character |clause | |<code>faction_power = { faction = faction_succ_seniority power = 1.0 }</code> |Factions |- |family !✓ |character |character/title/bool |Seems to be the same as <code>dynasty</code> |<code>any_vassal = { family = ROOT }</code> |Family |- |father_of_unborn_known !✓ |character |bool |Checks if a pregnant woman's unborn child has a known father. | |Family |- |fertility !✓ |character |double |The character's fertility value. In-game, can only be seen through the "charinfo" console command. | |Characters |- |flank_has_leader !✓ |battle |bool |Used in combat tactics | |Wars |- |flank_has_tactic !X |battle(?) |bool | | |Wars |- |from_ruler_dynasty !✓ |character |bool | |from_ruler_dynasty = yes |Family |- |gold !X |character |int |How much money a character has. | |Money |- |government !✓ |character |government |Check government type of a character. For checking government groups, see <code>is_feudal</code>, <code>is_republic</code>, etc. |government = nomadic_government |Government |- |graphical_culture !✓ |character |culturegfx |A character's graphical culture. This is different from the effect set_graphical_culture which takes a culture, not a culturegfx. In-game, can only be seen through the "charinfo" console command. '''Fixed in 2.8.''' (In 2.7 and earlier, checking against an invalid culturegfx will cause a CTD.) |graphical_culture = norsegfx |Characters |- |had_artifact_flag !✓ |character |clause |(2.8) Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. | |Control |- |had_bloodline_flag !X |bloodline |clause |Returns true if the current scope <bloodline> has had the script flag for the defined time period {|class="wikitable" !Parameter !! Type !! Description |- |flag || flag || Obligatory, flag to be checked |- |years/months/days || int || Obligatory, time since the flag should have been set |- |} | |Control |- |had_character_flag !✓ |character |clause |Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. |had_character_flag = { flag = money_from_the_pope days = 730 } |Control |- |had_dynasty_flag !X |character |clause |Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. | |Control |- |had_flag !✓ |any with flags |clause |Checks if the current scope has had a given flag for a given time in days, months or years. Works for any scope that can store flags, unlike the more specific had_''scope''_flag commands. |<code>had_flag = { flag = used_legendary_gathering years = 100 }</code> |Control |- |had_global_flag !✓ |any |clause |Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. |had_global_flag = { flag = crusade_called days = 180 } |Control |- |had_province_flag !✓ |province |clause |Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. |had_province_flag = { flag = aztec_explorers days = 730 } |Control |- |had_offmap_flag !X |offmap |clause |Checks whether the offmap power previously had the specified ''flag'' within the last number of ''days''. |<code>had_offmap_flag = { flag = busy days = 31 }</code> |Offmap |- |had_title_flag !X |title |clause |Note: ''months'' and ''years'' do not work as parameters, only ''days'' does. |had_title_flag = { flag = xxx days = 730 } |Control |- |has_ambition !✓ |character |bool/objective | |has_ambition = obj_improve_martial |Objectives |- |has_any_building !✓ |title |bool |Checks if the holding has any building |has_any_building = yes |Holdings |- |has_any_opinion_modifier !✓ |character |modifier |Similar to ''has_opinion_modifier''. |has_any_opinion_modifier = opinion_seducing_concubine |Characters |- |has_any_quest !✓ |character |bool |Checks whether or not the scoped character has any quests |has_any_quest = yes |Characters |- |has_any_symptom !X |character |bool | | |Health |- |has_artifact !✓ |character |artifact |Checks if the scoped character owns an artifact by that name. |has_artifact = necronomicon |Artifacts |- |has_artifact_flag !✓ |artifact |flag |Checks if the scoped artifact has the given flag defined. |has_artifact_flag = crown_jewel |Artifacts |- |has_assigned_minor_title !✓ |character |minorTitle/clause |Checks to see if the character has assigned a particular minor title, or at least how many of them |has_assigned_minor_title = title_master_of_the_horse has_assigned_minor_title = { title = title_commander count = 2 } |Characters |- |has_autocephaly !✓ |character |bool |Checks for religion autocephaly = yes |has_autocephaly = yes |Religion |- |has_bloodline_flag !✓ |bloodline |string |Checks if a bloodline has a specified flag. <br/>'''Note:''' "flags" in CKII scripting are not pre-determined or stored anywhere, they are dynamically created in the script. A mistyped flag will not be caught by the Validator, as there are no "invalid" flags. |has_bloodline_flag = created_bloodline |Control |- |has_blood_oath_with !✓ |character |character | |has_blood_oath_with = ROOT |Clans |- |has_building !✓ |title (barony only),province |building |Checks if a holding has the specified building (under construction buildings do not count). |<pre> family_palace = { has_building = fp_mansion_4 } </pre> |Holdings |- |has_called_crusade !✓ |character |bool | | |Religion |- |has_capital !X |province |bool | | |Province |- |has_character_flag !✓ |character |string |Checks if a character has a specified flag. <br/>'''Note:''' "flags" in CKII scripting are not pre-determined or stored anywhere, they are dynamically created in the script. A mistyped flag will not be caught by the Validator, as there are no "invalid" flags. | |Control |- |has_character_modifier !✓ |character |modifier |Checks if the character has a [[modifiers|modifier]] |<code>has_character_modifier = illumination</code> |Modifiers |- |has_children !✓ |character |bool |Checks if the character has children. Functionally identical to num_of_children = 1. |<code>has_children = yes</code> | |- |has_claim !✓ |character |title | |<code>has_claim = k_papal_state</code> |Claims |- |has_council !✓ |character |bool | |liege = { has_council = yes } |Council |- |has_concubinage !✓ |character |bool |Checks if religion flag max_consorts > 0 |<code>has_concubinage = yes</code> |Religion |- |has_crown_law_title !✓ |title |bool |Used to check crown laws for a specified title. Is not a condition itself though, it must be used as a scope to check crown laws by category (succession, for instance). | |Government |- |has_de_jure_pretension !✓ |title |character | |<code>any_demesne_title = { has_de_jure_pretension = ROOT }</code> |Rulers |- |has_disease !✓ |character/province |bool | | <pre> any_courtier = { has_disease = yes } </pre> |Health |- |has_dlc !✓ |any |string |Checks if the user has a specified DLC. Values: "The Sword of Islam", "Legacy of Rome", "Sunset Invasion", "The Republic", "The Old Gods", "Sons of Abraham", "Rajas of India", "Charlemagne", "Way of Life", "Horse Lords", "Zeus" or "Conclave" (both are equivalent), "Reapers", "Mystics", "Jade Dragon", or "Holy Fury". |has_dlc = "Charlemagne" |Control |- |has_dynasty_flag !✓ |character |flag | |has_dynasty_flag = strange_chest |Control |- |has_earmarked_regiments !✓ |character |flag |Set via spawn_unit command and earmark parameter. |has_earmarked_regiments = conscripted_merchant_ships |Control |- |has_earmarked_regiments_not_raiding !✓ |character |flag |Check for earmark & raiding |has_earmarked_regiments_not_raiding = tribal_organize_raid |Control |- |has_embargo !✓ |character |character | |NOT = { has_embargo = FROM } |Wars |- |has_empty_holding !✓ |province |bool | | <pre> any_demesne_province = { has_empty_holding = yes } </pre> |Provinces |- |has_epidemic !✓ |character/province |bool |Checks for a trait with <code>is_epidemic = yes</code>, and checks if a province has an epidemic. | <pre> any_child = { has_epidemic = yes } capital_scope = { has_epidemic = yes } </pre> |Health |- |has_feud_with !✓ |character |character | |has_feud_with = ROOT |Clans |- |has_flag !✓ |any with flags |flag |Checks if the current scope has a given flag. Works for any scope that can store flags, unlike the more specific has_''scope''_flag commands. | |Control |- |has_focus !✓ |character |focus |Checks for [[focuses]] |has_focus = focus_war |Objectives |- |has_game_rule !✓ |any |clause |Checks if a [[game rule]] is active. See [[game rules modding]]. |<code>has_game_rule = { name = gender value = all }</code> |Control |- |has_game_started !✓ |any |bool |Checks if the game has been unpaused. |has_game_started = yes |Control |- |has_global_flag !✓ |any |flag |See [[flag]]s. |has_global_flag = found_the_holy_grail |Control |- |has_guardian !✓ |character |bool | | <pre> any_child = { has_guardian = no } </pre> |Guardianship |- |has_had_offmap_name !X |offmap |loc | |<pre>has_had_offmap_name = "liao_china"</pre> |Offmap |- |has_heresies !✓ |character/province |bool | | |Religion |- |has_higher_tech_than !✓ |province |province/character | |location = { has_higher_tech_than = ROOT } |Provinces |- |has_holder !✓ |title |bool |Checks whether a title is currently hold by a character. | <pre> any_claim = { has_holder = yes } </pre> |Titles |- |has_hospital !✓ |province |bool |Checks whether a province has a hospital | <pre> has_hospital = yes </pre> |Provinces |- |has_holding_modifier !✓ |title |modifier |Checks if the holding has the given [[modifiers|holding modifier]] | <pre> any_province_holding = { has_holding_modifier = recently_burnt_the_land } </pre> |Modifiers |- |has_horde_culture !✓ |character |bool |Check for hord flag from culture definition | |Culture |- |has_inheritance_blocker !X |character |bool |Checks if the character in the current scope has a trait that blocks inheritance (cannot_inherit = yes) | |- |has_instances_of_character_modifier !X |character |modifier |Checks if the character has a amount of times the given [[modifiers|character modifier]] | <pre> has_instances_of_character_modifier = { modifier = x amount = y } </pre> |Modifiers |- |has_instances_of_holding_modifier !X |title |modifier |Checks if the holding has a amount of times the given [[modifiers|holding modifier]] | <pre> has_instances_of_holding_modifier = { modifier = x amount = y } </pre> |Modifiers |- |has_instances_of_province_modifier !X |province |modifier |Checks if the province has a amount of times the given [[modifiers|province modifier]] | <pre> has_instances_of_province_modifier = { modifier = x amount = y } </pre> |Modifiers |- |has_job_action !✓ |character |bool/jobAction | |has_job_action = action_improve_relations |Jobs |- |has_job_title !✓ |character |jobTitle/bool |Checks that character is a councillor. |has_job_title = job_chancellor |Jobs |- |has_known_creation_date !✓ |artifact |bool |(2.8) Checks if the artifact has a creation date on record. | |Artifacts |- |has_landed_title !✓ |character |bool/title | |has_landed_title = k_jerusalem |Titles |- |has_law !✓ |character/title |law | |has_law = succ_feudal_elective <br/> has_law = agnatic_succession |Government |- |has_liege_enforced_peace !✓ |character |bool |Prevents wars, also see <code>will_liege_enforce_peace</code>. |has_liege_enforced_peace = no |Realm |- |has_living_children !X |character |bool |Checks if the character has living children. |<code>any_dynasty_member = { has_living_children = yes }</code> | |- |has_lover !✓ |character |bool |Yes if the character has a lover | |Marriage |- |has_mercenary_band !✓ |title |bool |Checks if character has already created a mercenary band. |<code>has_mercenary_band = yes</code> | |- |has_mercenary_maintenance_modifier !✓ |title |modifier |Checks for a static modifier added via <code>set_mercenary_maintenance_modifier</code> on scoped mercenary tile. |<code>has_mercenary_maintenance_modifier = maintaining_mercenary_band</code> |Modifiers |- |has_minor_title !✓ |character |minorTitle/bool |Yes if the character has a minor title. Also includes religion titles. |has_minor_title = title_court_jester |Characters |- |has_newly_acquired_titles !✓ |character |bool |Character holds titles he just recently acquired | |Titles |- |has_nickname !✓ |character |bool/nickname |Can be used to check for a specific nickname, or the fact of having a nickname. |<code>has_nickname = nick_the_bastard</code> <code>has_nickname = no</code> |Characters |- |has_non_aggression_pact_with !✓ |character |character |Checks if a character a non-aggression pact with another character. |<code>has_non_aggression_pact_with = ROOT</code> | |- |has_objective !X |character |objective |Deprecated, replaced by has_ambition/has_plot | |Objectives |- |has_offmap_currency !✓ |character |clause |Whether the character has at least ''value'' currency in the specified ''offmap'' ID. |<pre>has_offmap_currency = { offmap = offmap_china value = 10 }</pre> |Offmap |- |has_offmap_flag !✓ |offmap |string |Checks if the specified temporary flag was added to the scoped offmap power, or if the scoped power's current status or policy has the flag included by default in its flags = { } array. |<pre>has_offmap_flag = disallow_interactions</pre> |Offmap |- |has_offmap_name !✓ |offmap |loc |Checks if the scoped offmap power has the specified localisation key as its current name. |<pre>has_offmap_name = "liao_china"</pre> |Offmap |- |has_offmap_news_enabled !✓ |character |offmap |Checks if the player ruler has chosen to receive news events from the specified offmap power through the interface. |<pre>has_offmap_news_enabled = offmap_china</pre> |Offmap |- |has_offmap_tmp_flag !✓ |offmap |string |Checks if the specified temporary flag was added by script to the scoped offmap power, NOT including those defined in the offmap status or policy files. |<pre>has_offmap_tmp_flag = china_invaded_player_dynasty</pre> |Offmap |- |has_opinion_modifier !✓ |character |clause |Checks if the scoped character has the given [[modifiers|opinion modifier]] towards 'who' character | <pre> has_opinion_modifier = { who = ROOT modifier = i_attempted_murder } </pre> |Opinion |- |has_overseas_holdings !✓ |character |bool | | |Rulers |- |has_owner !✓ |province |bool | | <pre> any_neighbor_province = { has_owner = yes } </pre> |Rulers |- |has_pentarchy !X |religion/character/province |bool |Checks for whether the associated religion has a pentarchy. Works with anything that has a religion |<code>has_pentarchy = yes</code> |Religion |- |has_plot !✓ |character |plot | | <pre> any_courtier = { has_plot = plot_kill_character } </pre> |Objectives |- |has_policy !✓ |offmap |policy |Checks if the scoped offmap power currently has the specified offmap policy (defined in /common/offmap_powers/policies). |<pre>has_policy = china_isolationist</pre> |Offmap |- |has_polygamy !✓ |character |bool |Checks if religion flag max_wives > 0 |has_polygamy = yes |Religion |- |has_portrait_property !X |character |clause |Checks if a character has a given portrait property/overlay/etc. |has_portrait_property = { layer = 6 index = 1 } |Characters |- |has_position !✓ |character |attitude/character |Checks the voting attitude of a councillor, or if same as another character. Also see <code>is_voter</code>. Not to be confused with <code>has_minor_title</code> or <code>has_job_title</code>. |<code>has_position = loyalist</code> |Council |- |has_pressed_claim !X |character |title |True if the character has a pressed claim (i.e., a non-heritable weak or strong claim created through Fabricate Claims) on the target title. |<code>has_pressed_claim = k_papal_state</code> |Claims |- |has_province_flag !✓ |province |flag | |has_province_flag = heresy_in_province |Control |- |has_province_modifier !✓ |province |modifier |Checks if the province has the given [[modifiers|province modifier]] | <pre> any_realm_province = { has_province_modifier = heretic_stronghold } </pre> |Modifiers |- |has_quest !✓ |character |quest_name |Checks if the scoped character has a quest with the given quest_name. | <pre>has_quest = quest_indian_monastic_order_pilgrimage</pre> |Societies |- |has_raised_levies !✓ |character |character |Whether character has some personal levies (vassal levies do not count) | <pre> liege = { has_raised_levies = ROOT } </pre> |Wars |- |has_raised_standing_troops !✓ |title |bool | | <pre> primary_title = { NOT = { has_raised_standing_troops = yes } } </pre> |Wars |- |has_regent !✓ |character |bool | |liege = { has_regent = no } |Titles |- |has_regiments !✓ |character |bool | |has_regiments = no |Wars |- |has_religion_feature !✓ |character |feature |Checks if character religion has a specific feature |has_religion_feature = religion_equal |Religion |- |has_religion_features !✓ |any |bool |Detects if religion features are enabled in the current game (usually dependent on whether or not Holy Fury is active) |has_religion_features = no |Religion |- |has_secret_religion !✓ |character |bool |Checks if character secretly follows another religion |has_secret_religion = yes |Religion |- |has_settlement_construction !✓ |province |bool |Checks if a holding is under construction in the province |<pre> NOR = { num_of_settlements = 5 AND = { num_of_settlements = 4 has_settlement_construction = yes } } </pre> |Holdings |- |has_siege !✓ |title(holding) |bool |Holding is under siege. |has_siege = no |Wars |- |has_status !✓ |offmap |status |Checks if the scoped offmap power currently has the specified offmap status modifier (defined in /common/offmap_powers/statuses). |<pre>has_status = china_unrest</pre> |Offmap |- |has_status_flag !✓ |offmap |string |Checks if the scoped offmap power has the specified flag in its current offmap status modifier's <code>flags</code> list. |<pre>has_status_flag = disallow_interactions</pre> |Offmap |- |has_strong_claim !✓ |character |title | | |Claims |- |has_strong_pressed_claim !X |character |title |True if the character has a strong pressed claim (i.e., a non-heritable strong claim) on the target title. |<code>has_strong_pressed_claim = k_papal_state</code> |Claims |- |has_terrain_specialization !X |character |terrain/any/bool |Checks for traits with terrain command modifiers | |Traits |- |has_title_flag !X |title |flag | | |Control |- |has_trade_post !✓ |province/title? |bool | | |Provinces |- |has_truce !X |character |character | | |Wars |- |has_weak_claim !✓ |character |title | | |Claims |- |has_weak_pressed_claim !X |character |title |True if the character has a weak pressed claim (i.e., a non-inheritable claim) on the target title. |<code>has_weak_pressed_claim = k_papal_state</code> |Claims |- |health !✓ |character |int |A character's health value. In-game, can only be seen through the "charinfo" console command. | |Health |- |health_traits !✓ |character |int |Number of traits with <code>is_health = yes</code> |health_traits = 1 |Traits |- |held_title_rating !✓ |character |character | |held_title_rating = FROM |Titles |- |higher_real_tier_than !X |character |character/tier |Same as ''higher_tier_than'' but ignores temporary titles | |Tier |- |higher_tier_than !✓ |character/title |character/tier/title |Check that the tier of scoped character/title is strictly higher than the given tier. |primary_title = { higher_tier_than = BARON } |Tier |- |holding_diff !✓ |character |clause | |<pre>holding_diff = { first_type = city first_count_vassals = yes second_type = none value = 1.5 }</pre> |Holdings |- |holding_type !✓ |title |string |city / temple / castle / tribal / nomad / family_palace | |Holdings |- |hospital_has_any_building !X |province |bool |Checks if the hospital of the province has any buildings. | |Buildings |- |- |hospital_has_building !✓ |province |building |Checks if a hospital has the specified building. |<code>hospital_has_building = library_1</code> |Buildings |- |hospital_level !✓ |province |int |Checks if a province has at least the given hospital level. |<code>hospital_level = 2</code> |Provinces |- |holding_garrison_percent !X |holding |float |Checks how full the holding's garrison is. 1 is 100%, 0 is 0%. |<code>holding_garrison_percent < 1</code> |Holdings |- |holding_raisable_levy_percent !X |holding |float |Checks how full the holding's raisable levy is. 1 is 100%, 0 is 0%. |<code>holding_raisable_levy_percent < 1</code> |Holdings |- |holding_total_levy_percent !✓ |holding |float |Checks how full the holding's total levy (garrison + raisable) is. 1 is 100%, 0 is 0%. |<code>holding_total_levy_percent < 1</code> |Holdings |- |holds_favor_on !✓ |character |character |Checks if a character holds a favor toward another character. The reverse condition is <code>owes_favor_to</code>. |<code>liege = { holds_favor_on = ROOT }</code> |Characters |- |holy_order !✓ |character/title |bool | |primary_title = { holy_order = no } |Titles |- |immortal !✓ |character |bool |Checks if the character has a trait with <code>immortal = yes</code> |immortal = no |Health |- |immortal_age !X |character |int |Checks which age at which a character became immortal at. |immortal_age > 40 |Health |- |imprisoned_days !✓ |character |int | |any_courtier = { imprisoned_days = 100 } |Characters |- |independent !✓ |character/title |bool | | |Rulers |- |infamy !X |character |double |[[Threat]] |infamy = 12.5 |Wars |- |intrigue !✓ |character |int |A character's Intrigue stat. | |Characters |- |in_battle !✓ |character |bool | | |Wars |- |in_command !✓ |character |bool |Character is leading troops. | |Characters |- |in_faction !✓ |character |bool/faction | |in_faction = faction_independence |Factions |- |in_revolt !✓ |character |bool | |liege = { in_revolt = no } |Titles |- |in_siege !✓ |character |bool | |in_siege = no |Wars |- |interested_in_society !✓ |character |bool |Check if the character is interested in the society with the given tag. |interested_in_society = the_cult_of_kali |Societies |- |interested_in_society_of_character !✓ |character |character |(2.8) Check if the character is interested in the society that the target character is a member of. |interested_in_society_of = ROOT |Societies |- |is_abroad !✓ |character |bool |Valid if character is 'abroad' (not at liege's court) | |Characters |- |is_adult !✓ |character |bool |Checks if the character is an adult. | |Characters |- |is_alive !✓ |character |bool |If yes, will only affect alive characters | |Health |- |is_allied_with !X |character |character |Checks for [[alliances]] and [[tributary]] relationships. Does not check for being temporary war allies. Expensive calculation, use with care<ref>[[Forum:774248]]</ref> | |Wars |- |is_allowed_holding_type !✓ |title(holding) |character |Checks if holding type is allowed by the government of specified character |is_allowed_holding_type = FROM |Government |- |is_allowed_to_loot !✓ |character |bool |Character can raid. |is_allowed_to_loot = yes |Rulers |- |is_alternate_start !✓ |any |bool |If the world is randomised/shattered. |<code>is_alternate_start = no</code> |Control |- |is_ancestor_of !✓ |character |character |(2.8) Checks if the scoped character is a progenitor of the target character's bloodline, within up to sixteen generations (for performance reasons). Expensive, so use with caution. | is_ancestor_of = ROOT |Characters |- |is_artifact_active !X |artifact |bool |Checks if the scoped artifact is currently active, as defined by its active trigger. Artifacts without an active trigger will always be considered active, even if not owned, and artifacts with an active trigger and without an owner will never be considered active. | |Artifacts |- |is_artifact_equipped !X |artifact |bool |Checks if the scoped artifact is currently equipped by its owner. | |Artifacts |- |is_artifact_same_type_as !X |artifact |artifact |Checks if the scoped artifact is the same as the given artifact |is_artifact_same_type_as = ROOT |Artifacts |- |is_at_sea !✓ |character |bool | | |Characters |- |is_attacker !✓ |siege |bool | |siege = { is_attacker = yes } |Wars |- |is_aunt_uncle_of !✓ |character |character |(2.8) Checks if the current scoped character is the sibling of either of the target character's parents (i.e., one of the target character's parents' siblings, colloquially known as [https://www.urbandictionary.com/define.php?term=pibling "piblings"]). | is_aunt_uncle_of = ROOT |Characters |- |is_betrothed !✓ |character |bool |If yes, will only affect betrothed characters | |Marriage |- |is_bloodline_founder_of !X |character |bloodline |Returns true if current scope <character> is the founder of RightHand-Side(RHS) scope <bloodline>. | |Bloodlines |- |is_bloodline_member_of !X |character |bloodline |Returns true if current scope <character> is a member of RightHand-Side(RHS) scope <bloodline>. | |Bloodlines |- |is_capital !✓ |province/title |bool |If yes, will only affect the capital HOLDING | |Titles |- |is_child_of !✓ |character |character |Checks if the scope is a child of another character | |Family |- |is_close_relative !✓ |character |character |checks if the scope is a close relative of another character. This includes spouses, parents, children, siblings, grandparents, and grandchildren | <code>is_close_relative = ROOT</code> |Family |- |is_conquered !✓ |title |bool | |primary_title = { is_conquered = yes } |Titles |- |is_consort !✓ |character |bool/character |Checks if the scoped character is a concubine/consort of somebody; or a concubine/consort or the specified character |father_of_unborn = { is_consort = ROOT} |Marriage |- |is_contested !✓ |title |bool |If title is already being contested in some form of Claim or Succession War | |Titles |- |is_council_content !✓ |character |bool |Checks whether the council is content or not. |<code>liege = { is_council_content = no }</code> |Council |- |is_councillor !✓ |character |bool |Checks if character has a councillor job (chancellor, ...) |<code>any_courtier = { is_councillor = yes }</code> |Jobs |- |is_cousin_of !✓ |character |bool |(2.8) True if the current scoped character is related to the target character by way of parental siblings. | is_cousin_of = ROOT |Characters |- |is_crown_law_title !✓ |title |bool |Checks for titles that can have [[crown laws]]. |<code>is_crown_law_title = yes</code> |Titles |- |is_decision_allowed is_law_allowed is_targetted_decision_allowed is_title_decision_allowed is_settlement_decision_allowed is_trade_post_decision_allowed is_fort_decision_allowed is_hospital_decision_allowed !✓ |? |decision |Checks if current scope matches the allow block of the given decision | |Control |- |is_decision_potential is_law_potential is_targetted_decision_potential is_title_decision_potential is_settlement_decision_potential is_trade_post_decision_potential is_fort_decision_potential is_hospital_decision_potential !✓ |? |decision |Checks if current scope matches the potential block of the given decision | |Control |- |is_connected_to !✓ |province/title(county) |clause |Checks if two provinces are connected via some realm's territory. Can be somewhat performance intensive, so use sparingly. {|class="wikitable" !Parameter !! Type !! Description |- |target || capital/<br/>realm_capital/<br/>scope || Required. What province to find a connection to. Alternatively takes a scope that can be resolved to a province. |- |sea_gap || bool || Whether to allow pathing through gaps of a single sea province. Defaults to "no". Can't path through lakes. |- |land_gap || bool || Whether to allow pathing through gaps of a single land province. Defaults to "no". Can't path through wastelands. |- |sub_realm || bool/scope || Which realm to allow pathing through. "yes" for the sub-realm of the province owner. "no" for the realm of the top-liege. Alternatively takes a scope that can be resolved to a character. Defaults to "yes". |- |naval_distance || bool/int || Whether to allow pathing by sea (any number of provinces). Can take a number instead to use a max distance from already found ports. |- |} | <pre>is_connected_to = { sub_realm = no target = realm_capital land_gap = yes naval_distance = yes }</pre> |Provinces |- |is_descendant_of !✓ |character |character |(2.8) Checks if the scoped character descends from the target character, within up to sixteen generations (for performance reasons). Expensive, so use with care. | is_descendant_of = ROOT |Characters |- |is_dying !✓ |character |bool |Checks if character is about to die. Used for on_actions called just when character dies, such as on_chronicle_owner_change. | |Characters |- |is_father !✓ |character |character | |FROM = { is_father = PREV } |Family |- |is_father_real_father !✓ |character |bool |Case of illegitimate bastards. | |Family |- |is_female !✓ |character |bool |If yes, will only affect female characters. Can also be used as an event [[pre-trigger]]. | |Characters |- |is_feudal !✓ |character/title |bool |Checks if government is part of feudal_governments group. |is_feudal = yes |Government |- |is_foe !✓ |character |character |Checks if the target character is_rival or has an opinion modifier with crime = yes toward the scoped character |is_foe = ROOT |Relations |- |is_former_lover !✓ |character |bool | |is_former_lover = ROOT |Marriage |- |is_friend !✓ |character |character |Checks if this character is a friend of the given character |is_friend = ROOT |Relations |- |is_government_potential !✓ |character |government |Checks if a character matches the potential block of another government. |NOT = { is_government_potential = merchant_republic_government } |Government |- |is_grandchild_of !✓ |character |character |(2.8) Checks if the scoped character is the son or daughter of the target character's son or daughter. | is_grandchild_of = ROOT |Characters |- |is_grandparent_of !✓ |character |character |(2.8) Checks if the scoped character is the father or mother of the target character's father or mother. | is_grandparent_of = ROOT |Characters |- |is_guardian !✓ |character |bool/character | |father = { is_guardian = no } |Guardianship |- |is_hard_to_convert !✓ |character/province |bool |Checks if the character or province's religion has the field hard_to_convert = yes |<code>is_hard_to_convert = yes</code> |Religion |- |is_heir !✓ |character |bool/character |Checks if a character is first in the succession line of a title. |<code>any_child = { is_heir = no }</code> |Character |- |is_heresy_of !✓ |character/province |character/province/title/religion | |any_rival = { is_heresy_of = ROOT } |Religion |- |is_heretic !✓ |character/province |bool | | |Religion |- |is_holy_site !✓ |title |character/religion |Checks if a barony is a holy site of the religion of specified character |<pre> any_realm_title = { is_holy_site = ROOT } </pre> <code>is_holy_site = nestorian</code> |Religion |- |is_ill !✓ |character |bool |Checks for traits with <code>is_illness = yes</code> | |Health |- |is_immune_to_pruning !X |character |bool |If yes, the character has been flagged with the set_immune_to_pruning command, or by the internal game logic, and will not be culled from AI courts or savegames to reduce file size/memory use. |is_immune_to_pruning = yes |Characters |- |is_in_same_unit_as !✓ |character |character |Checks if the two characters are in the same unit. Does NOT check every unit on a side of a combat, unlike any/random_unit_leader. |<code>is_in_same_unit_as = ROOT</code> |Wars |- |is_in_society !✓ |character |bool/society |Checks to see if a character is in a society or not, or if the character is in that particular society. |is_in_society = yes |Societies |- |is_incapable !✓ |character |bool |Checks if the character is incapable. With the addition of sick_incapable in RD, it's important to use this conditional instead of checking for trait = incapable. | |Health |- |is_indestructible !X |artifact |bool |Checks if the artifact is indestructible (has <code>indestructible = yes</code>) |is_indestructible = yes |Artifacts |- |is_interested_in_any_society !✓ |character |bool |Checks if character is currently showing interest in a society or not. |is_interested_in_any_society = yes |Societies |- |is_ironman !✓ |character |bool |Used in achievements.txt | |Control |- |is_island !X |province |bool |Checks if the province exists in island_region.txt. |is_island = yes |Provinces |- |is_land !✓ |province |bool |Checks that province is not a sea province | |Provinces |- |is_landed !✓ |character |bool |Checks that character owns a landed title. Note: landed characters are also rulers (<code>is_ruler = true)</code>. | |Characters |- |is_landed_title_allowed !✓ |character |title |Checks if the character fulfills the allow conditions of a particular title. |is_landed_title_allowed = e_hre |Characters |- |is_landless_type_title !✓ |title |bool | | |Titles |- |is_liege_of !✓ |character |character/title/province |Check if the scoped character is a liege of the right hand side character. |host = { is_liege_of = ROOT } |Vassalage |- |is_liege_or_above !✓ |character/province |character/title/province | |owner = { is_liege_or_above = FROM } |Vassalage |- |is_liege_or_above_of !X |character |character | Checks that scoped character is a superior to the right hand side character in the top liege's realm. |<code>is_vassal_or_below_of = ROOT</code> |Vassalage |- |is_located_in !✓ |title |character/title | |crusade_target = { is_located_in = ROOT } |Provinces |- |is_looting !X |character |bool | | |Wars |- |is_looting_in !X |character |province | | |Wars |- |is_lover !✓ |character |bool/character |Checks if this character is a lover of the given character |is_lover = ROOT |Marriage |- |is_lowborn !X |character |bool |Checks if the character is lowborn. '''Fixed in 2.8.''' (In versions prior to 2.8, it worked backwards: setting it to no will pick out characters that are actually lowborn.) Equivalent to <code>dynasty = none</code> |is_lowborn = no |Characters |- |is_main_spouse !✓ |character |bool |If yes, is primary wife. (Although written gender neutral, there are no multiple-husband polygamies in CK2.) | |Marriage |- |is_marriage_adult !✓ |character |bool |Checks if the character is old enough to marry, based on <code>NDefines.NCharacter.AGE_OF_MARRIAGE_MALE</code> and <code>NDefines.NCharacter.AGE_OF_MARRIAGE_FEMALE</code>. | |Marriage |- |is_married !✓ |character |bool/character |Yes, will only affect married characters | |Marriage |- |is_married_matrilineally !X |character |bool | | |Marriage |- |is_merchant_republic !✓ |character/title |bool |Checks if character is the doge of a merchant republic or if title is a merchant republic. | |Government |- |is_mother !✓ |character |character | |is_mother = ROOT |Family |- |is_multiplayer_host_character !✓ |character |bool |Whether scoped character is the host in a multiplayer game. |<code>is_multiplayer_host_character = yes</code> |Control |- |is_navy !X |unit |bool |Checks if a unit is a fleet. | |Units |- |is_nibling_of !✓ |character |character |(2.8) Checks if the current scoped character is a niece/nephew of the target character (colloquially known by the gender-neutral [https://en.wiktionary.org/wiki/nibling "nibling"]). | is_nibling_of = ROOT |Characters |- |is_nomadic !✓ |character |bool |Checks if character government is part of nomadic_governments group. |is_nomadic = yes |Government |- |is_occupied !✓ |title/province |bool | Checks if a barony or county is occupied by enemy troops. Does not work on duchy or above. |<pre> any_demesne_title = { NOT = { higher_tier_than = count } is_occupied = no } </pre> |Wars |- |is_offmap_governor !✓ |character |bool/id |Checks if this character is/is not a governor of an offmap power (bool), or of the specified offmap power (id). |<pre>is_offmap_governor = yes</pre> <pre>is_offmap_governor = offmap_china</pre> |Offmap |- |is_offmap_ruler !✓ |character |bool |Is this character the ruler of an offmap power? |<pre>is_offmap_ruler = no</pre> |Offmap |- |is_offmap_tag !✓ |offmap |id |Checks if the current scoped offmap power is the offmap power with the specified ID. |<pre>is_offmap_tag = offmap_china</pre> |Offmap |- |is_offmap_tag_including_dead !✓ |character |id |Whether this character is a current or former member of the offmap power with the specified ID. Used for Chinese clothing for portraits. |<pre>NOT = { is_offmap_tag_including_dead = offmap_china }</pre> |Portraits |- |is_older_than !✓ |character |character | Checks if the scoped character is older than the target. Even works for twins and other characters with the same age. |any_sibling = { is_older_than = ROOT } |Characters |- |is_opposite_sex !✓ |character |character | |is_opposite_sex = ROOT |Characters |- |is_or_was_offmap_power_ruler !✓ |character |bool |Checks whether the scoped character is currently the ruler (holder) of the specified offmap power, or died while holding that title. |is_or_was_offmap_power_ruler = yes |Offmap |- |is_parent_religion !✓ |character |character/province/title | |top_liege = { is_parent_religion = ROOT } |Religion |- |is_powerful_vassal !✓ |character |bool |Checks if a character is considered a [[Council#Powerful vassals|powerful vassal]]. If Conclave is enabled, these vassals have a raised fist icon and expect a seat on the council. The trigger works even without Conclave. Also see <code>among_most_powerful_vassals</code>. | |Realm |- |is_parent_of !✓ |character |character |(2.8) Checks if the current scoped character is the mother or father of the target character. | is_parent_of = ROOT |Characters |- |is_patrician !✓ |character |bool |Checks if a character is the head of a Merchant Republic patrician family. Can also be used as an event [[pre-trigger]] | |Government |- |is_pilgrim !X |character |bool |Checks if a character has a pilgrim trait | |Characters |- |is_playable !✓ |character |bool |Only affects playable characters (depending on the loaded DLCs) | |Characters |- |is_plot_active !✓ |character |bool |In conjunction with leads_faction | |Objectives |- |is_plot_target_of !✓ |character |character | |any_realm_lord = { is_plot_target_of = ROOT } |Objectives |- |is_preferred_holding_type !✓ |title |character |Preferred holding type of character, based on its government. |<pre> defacto_liege_title = { is_preferred_holding_type = FROM } </pre> |Rulers |- |is_pregnant !✓ |character |bool |Evaluates true the moment a woman is pregnant (unlike the 2 month delay for the on_pregnancy action). | |Characters |- |is_pretender !✓ |character/title |bool |In title scope, checks vs ROOT character. |<pre>FROM = { is_pretender = yes }</pre> |Titles |- |is_priest !✓ |character |bool |Checks if character is either a Court Chaplain or landed with the [[Government#Theocracy|Theocracy government type]] | |Characters |- |is_primary_heir !✓ |character |bool/character |Heir to primary title (regardless if same dynasty or not) |FROM = { is_primary_heir = ROOT } |Titles |- |is_primary_holder_title !✓ |title |bool | | |Rulers |- |is_primary_holder_title_tier !✓ |title |bool | | |Tier |- |is_primary_type_title !✓ |title |bool |Checks the flag ''primary'' of the title, for titles that cannot be held as secondary title. This covers mercenaries, the Pope, Holy Orders, etc. | |Titles |- |is_primary_war_attacker !✓ |character |bool | | |Wars |- |is_primary_war_defender !✓ |character |bool | |any_friend = { is_primary_war_defender = yes } |Wars |- |is_quest_target !✓ |character/title/province |bool |Checks if the current scope is being targeted by a quest. |is_quest_target = yes |Societies |- |is_quest_target_of !✓ |character/title/province |bool |Checks if the current scope is being targeted by any quest the given character has. |is_quest_target_of = ROOT |Societies |- |is_recent_grant !✓ |title |bool | |is_recent_grant = no |Titles |- |is_reformed_religion !✓ |character/province |bool/character |Checks if the religion of character or province is a reformed pagan religion. | |Religion |- |is_reincarnated !✓ |character |bool | |any_sibling = { is_reincarnated = yes } |Family |- |is_republic !✓ |character/title |bool |Checks if government is part of republic_governments group. |is_republic = yes |Government |- |is_rival !✓ |character |character | | |Relations |- |is_ruler !✓ |character |bool |Yes, will only affect characters who have a title (who are a ruler). Note that the character may not necessarily be landed (<code>is_landed = false</code>) in case of mercenaries, holy orders, or adventurers. | |Rulers |- |is_save_game !✓ |character |bool |Checks if is a saved game (used for startup events). |is_save_game = yes |Characters |- |is_seafarer !✓ |character |bool |Checks if either the culture or religion have the seafarer flag set. |is_seafarer = yes |Characters |- |is_senior_consort_party !✓ |character |bool |Checks if the scoped character has concubines/consorts rather than being someone's concubine/consort. |<code>is_senior_consort_party = yes</code> |Marriage |- |is_society !✓ |society |society |Checks if the currently scoped society is the same as the given one. |<code>is_society = the_satanists</code> |Societies |- |is_society_discovered !✓ |character |bool |Checks if the scoped character has been "revealed" as part of a secret society, whether they're actually a member of it or not. |is_society_discovered = yes |Societies |- |is_society_discovered_real !X |character |bool |Checks if the scoped character has been revealed as part of a secret society, and they are actually part of it. |is_society_discovered_real = yes |Societies |- |is_society_grandmaster !✓ |character |bool |Checks if scope character is the grandmaster of their society. |is_society_grandmaster = yes |Societies |- |is_society_rank_full !✓ |any |clause |Checks if named society's rank is full. |<code>is_society_rank_full = { society = the_plaguebringers rank = 1 }</code> |Societies |- |is_sub_unit_leader !X |character |bool |Checks if the character is the leader of a subunit. |<code>is_sub_unit_leader = yes</code> |Wars |- |is_theocracy !✓ |character/title |bool |Checks if government is part of theocracy_governments group. |is_theocracy = yes |Government |- |is_title_active !✓ |any |title |Indicates whether the landed title has a holder (landed titles deactivate if they have no holder). Landless titles (<code>landless = yes</code>) remain active once activated, which is done via the <code>activate_title</code> command. |is_title_active = d_knights_templar |Titles |- |is_titular !✓ |title |bool | |any_demesne_title = { is_titular = no } |Titles |- |is_treasurer !✓ |character |bool |Equivalent to <code>has_job_title = job_treasurer</code> | |Jobs |- |is_tribal !✓ |character/title(holding) |bool |Checks if government is part of tribal_governments group. |is_tribal = yes |Government |- |is_tribal_type_title !✓ |title |bool | | |Titles |- |is_tributary !✓ |character |bool/clause |Character is tributary to a suzerain. Type can specify what type of tribute they pay - if omitted, this will evaluate true for any type of tribute. suzerain can specify who they pay tribute to - if omitted, this will evaluate true if the character is a tributary of any suzerain. |<code>is_tributary = yes</code> <code>is_tributary = { type = imperial suzerain = FROM } </code> |Vassalage |- |is_twin_of !X |character |character |If yes, the scoped character is the target character's twin. |is_twin_of = ROOT |Characters |- |is_valid_attraction !✓ |character |character | |<code>any_courtier = { is_valid_attraction = ROOT }</code> |Marriage |- |is_valid_romance_target !✓ |character |character | |<code>any_courtier = { is_valid_romance_target = ROOT }</code> |Marriage |- |is_valid_viking_invasion_target !✓ |title |character |Checks that FROM holds the right amount of territory in the kingdom | |Wars |- |is_variable_equal !X |character/province |clause |Checks if a variable has the exact value, instead of standard >= check. See [[variables]]. |<code>is_variable_equal = { which = xxx value = xxx }</code> |Control |- |is_vassal_or_below !✓ |character |character | Checks that scoped character is the liege of right hand side character. '''Warning''': the naming is not intuitive, it seems reversed ! |<code>is_vassal_or_below = ROOT #is ROOT my vassal?</code> |Vassalage |- |is_vassal_or_below_of !X |character |character | Checks that scoped character is the vassal of the right hand side character. Actually intuitive (literal opposite of <code>is_vassal_or_below</code>). |<code>is_vassal_or_below_of = ROOT #am I the vassal of ROOT?</code> |Vassalage |- |is_vice_royalty !✓ |title |bool |Checks for viceroyalty flag on title |<code>is_vice_royalty = no</code> |Titles |- |is_voter !✓ |character |bool |Checks if character votes on the council (i.e. holds a position or title with the flag <code>is_voter = yes</code>). Also see <code>has_position</code>. |<code>any_vassal = { is_voter = yes }</code> |Council |- |is_winter !✓ |province |bool |Checks whether a province is ''currently'' experiencing a winter. To check whether it could experience a winter at all, regardless of current condition, use <code>climate</code>. |<code>location = { is_winter = yes }</code> |Provinces |- |is_within_diplo_range !✓ |character |character | |<code>is_within_diplo_range = FROM</code> |Relations |- |leader_traits !✓ |character |int |Number of traits with <code>leader = yes</code>. |<code>leader_traits= 1</code> |Traits |- |leads_faction !✓ |character |bool/faction | |<code>leads_faction = faction_succ_seniority</code> |Factions |- |learning !✓ |character |int |A character's learning attribute. For state value, see <code>realm_learning</code> | |Characters |- |lifestyle_traits !✓ |character |int |Number of traits with <code>lifestyle = yes</code>, normally 0 or 1 in vanilla. |<code>NOT = { lifestyle_traits = 1 }</code> |Traits |- |liked_by_offmap !✓ |character |clause |Checks whether the scoped character matches the current "like" of the offmap power of the specified ''type''. If the "like" has a context, the ''context'' parameter must match to return true. If the "like" has no context, the context parameter must be omitted to return true. |<code>liked_by_offmap = { type = offmap_china context = eunuch }</code> |Offmap |- |likes_better_than !✓ |character |clause |Equivalent to <code>opinion_diff</code> with value = 0. |<code>ROOT = { likes_better_than = { who = PREV than = PREVPREV} }</code> |Opinion |- |loot !✓ |unit? |int |Used in unit_event achievement. |<code>loot = 1000</code> |Wars |- |lower_real_tier_than !X |character |character/tier |Same as ''lower_tier_than'' but ignores temporary titles | |Tier |- |lower_tier_than !✓ |character/title |character/tier |Yes, will only affect characters who are of a lower tier | |Tier |- |martial !✓ |character |int/character |A character's Martial attribute. For state value, see <code>realm_martial</code> | |Characters |- |max_manpower !✓ |character |int | |max_manpower = 500 |Clans |- |mercenary !✓ |character/title |bool | | |Titles |- |mercenary_siphon_factor !✓ |title |double |Percentage of payment factor {{sup|?}} |<code>mercenary_siphon_factor = 0.05</code> |Titles |- |month !✓ |any |int |In-game month number. Ranges from 0 (January) to 11 (December). Will also evaluate to true if it is a later month, e.g. "10" will be true for both November and December in-game. | |Control |- |month_of_birth !✓ |character |int |Checks if the month of the character's date of birth is at least this number (January is month 1) |month_of_birth = 1 |Characters |- |monthly_income !✓ |character/title (holding) |double | | |Money |- |monthly_piety !X |character |double |Checks if the character's monthly piety is at least this amount. | |Characters |- |monthly_prestige !X |character |double |Checks if the character's monthly prestige is at least this amount. | |Characters |- |multiplayer !✓ |any |bool |Whether the game is multiplayer vs single player. | |Control |- |num_culture_provinces !✓ |any that have associated culture |int |Number of provinces in the world with the culture associated with the current scope. Takes comparison operators. |<code>norse = { num_culture_provinces < 10 }</code> |Culture |- |num_culture_realm_provs !✓ |character |clause |Number of provinces with given culture |<pre> num_culture_realm_provs = { value = 8 culture = swedish } </pre> |Culture |- |num_religion_provinces !✓ |any that have associated religion |int |Number of provinces in the world with the religion associated with the current scope. Takes comparison operators. |<code>norse_pagan = { num_religion_provinces > 20 }</code> |Religion |- |num_fitting_characters_for_title !✓ |title |int |Checks how many characters in ones court that would fit for a specific title | |Title |- |num_of_artifacts !✓ |character |int |Checks if if scoped character has at least the given number of artifacts. |num_of_artifacts = 3 |Artifacts |- |num_of_baron_titles !X |character |int | | |Titles |- |num_of_buildings !✓ |title |int | |any_demesne_title = { tier = baron num_of_buildings = 1} |Holdings |- |num_of_children !✓ |character |int |Note: Both living and deceased children are counted. | |Family |- |num_of_claims !✓ |character |int | | |Claims |- |num_of_consorts !✓ |character |int |Checks the number of | |Marriage |- |num_of_count_titles !✓ |character |int | | |Titles |- |num_of_count_titles_in_realm !✓ |character |int | |num_of_count_titles_in_realm = 35 |Titles |- |num_of_duke_titles !✓ |character |int | | |Titles |- |num_of_dynasty_members !✓ |character |int | |num_of_dynasty_members = 3 # Does not trigger for tiny dynasties |Family |- |num_of_emperor_titles !✓ |character |int | | |Titles |- |num_of_empty_holdings !X |province |int |Note: settlements under construction, do not count as empty. | |Provinces |- |num_of_extra_landed_titles !✓ |character |int | |liege = { num_of_extra_landed_titles = 1 } |Titles |- |num_of_faction_backers !✓ |character |clause |Checks the number of supporters for a given faction |<pre> num_of_faction_backers = { faction = faction_increase_council_power value = 0 } </pre> |Factions |- |num_of_feuds !✓ |character |int | |num_of_feuds = 3 |Clans |- |num_of_friends !✓ |character |int | | |Relations |- |num_of_government_vassals !✓ |character |clause | |<pre> num_of_government_vassals = { government = merchant_republic_government value = 1 }</pre> |Governments |- |num_of_holy_sites !✓ |character |int |Number of holy sites controlled by the religion | |Religion |- |num_of_hospitals !X |character |int |Number of hospitals the character controls | |Rulers |- |num_of_hospitals_diff !X |character |clause |Difference in number of hospitals controlled between 2 characters | |Rulers |- |num_of_king_titles !✓ |character |int | | |Titles |- |num_of_lovers !✓ |character |int | |NOT = { num_of_lovers = 5 } |Marriage |- |num_of_max_settlements !✓ |province |int |Checks the current number of constructed or constructible holding slots in a province |<code>NOT = { num_of_max_settlements = 7 }</code> |Provinces |- |num_of_plot_backers !✓ |character |int | |liege = { num_of_plot_backers = 8} |Objectives |- |num_of_prisoners !✓ |character |int | |liege = { num_of_prisoners = 1 } |Characters |- |num_of_realm_counties !✓ |character |clause |Scoped character controls at least N counties from specified title |num_of_realm_counties = { value = 6 title = PREV } |Rulers |- |num_of_rivals !✓ |character |int | | |Relations |- |num_of_settlements !✓ |province |int |Number of baronies the province has (maximum 7) | |Provinces |- |num_of_society_members !X |character/society |int |(2.8) Number of members who are in the scoped society or scoped character's society. Supports 2.8 <nowiki><, >=, ==, and <=</nowiki> operators. |num_of_society_members < 5 |Societies |- |num_of_subrealm_castles num_of_subrealm_cities num_of_subrealm_empty_provinces num_of_subrealm_tribes num_of_subrealm_temples !✓ |character |int | |NOT = { num_of_subrealm_cities = 20 } NOT = { num_of_subrealm_castles = 10 } |Rulers |- |num_of_spouses !X |character |int | | |Marriage |- |num_of_symptoms !✓ |character |int |Number of traits with is_symptom = yes |num_of_symptoms = 1 |Health |- |num_of_titles !✓ |character |int |Number of titles directly held by the character. Note that for this condition each County title is worth 2 while Barony, Duchy, Kingdom and Empire-tier titles are worth 1 each. |NOT = { num_of_titles = 2 } |Titles |- |num_of_trade_posts !✓ |character |int |Number of trade posts | |Rulers |- |num_of_trade_post_diff !✓ |character |clause |Difference of trade posts between 2 characters |<pre> num_of_trade_post_diff = { character = ROOT value = 10 } </pre> |Rulers |- |num_of_traits !✓ |character |int |Number of traits | |Traits |- |num_of_unique_dynasty_vassals !✓ |character |int |Number of vassals of different dynasties (excluding the dynasty of scoped character). | |Vassalage |- |num_of_vassals !✓ |character |int |Number of direct vassals | |Vassalage |- |num_title_realm_provs !✓ |title |clause |Number of counties in ROOT's realm. |<pre> num_title_realm_provs = { who = ROOT value = 6 } </pre> |Rulers |- |num_traits !✓ |character |int |Duplicate of num_of_traits | |Traits |- |obedient !✓ |character |character |Checks if the scoped character is obedient to the target character, e.g. has an opinion modifier with obedient = yes toward the target character. |<code>ROOT = { obedient = FROM }</code> |Relations |- |offmap_has_dislike !✓ |offmap |string |Checks whether the scoped offmap power has their current "dislike" assigned to the named scripted trigger. Note that in spite of "dislike" being negative, the vanilla triggers are shared between likes and dislikes, and therefore named in the positive (e.g., the current "''dis''like" may be "''likes'''_wealth" -- do not use "''dislikes''_wealth"). |<code>offmap_has_dislike = likes_wealth</code> |Offmap |- |offmap_has_like !✓ |offmap |string |Checks whether the scoped offmap power has their current "like" assigned to the named scripted trigger. |<code>offmap_has_like = likes_concubines</code> |Offmap |- |opinion !✓ |character |clause |Checks if the scope's opinion of ''who'' is at least this value |opinion = { who = ROOT value = 25 } |Opinion |- |opinion_diff !✓ |character |clause |True if ''first'' target character has a higher opinion of the currently scoped character than ''second'' target character by at least ''value'' points. <code>as_if_liege = yes</code> also applies the liege-vassal opinion modifiers (<code>vassal_opinion</code>, etc.) and is used in factions, to decide if a character would like someone better as liege than another one (and therefore would join a faction seeking to replace him). |opinion_diff = { first = LIEGE second = FROM value = 25 as_if_liege = yes } |Opinion |- |opinion_levy_raised_days !X |character |clause | |opinion_levy_raised_days = { who = ROOT days = 30 } |Opinion |- |overlord_of !✓ |character |character | |holder_scope = { overlord_of = FROM } |Rulers |- |over_max_demesne_size !✓ |character |int | |over_max_demesne_size = 4 |Rulers |- |over_vassal_limit !✓ |character |int | |over_vassal_limit = 6 |Rulers |- |owes_favor_to !✓ |character |character |Checks if a character owes a favor to another character. The reverse condition is <code>holds_favor_on</code>. |<code>liege = { owes_favor_to = ROOT }</code> | |- |owns !✓ |character |province | |owns = 333 # Rome |Rulers |- |owns_mercenary_units !✓ |character |bool |Checks if character owns mercenary units |<code>owns_mercenary_units = yes</code> | |- |pacifist !✓ |character |bool | |pacifist = yes |Characters |- |pays_tribute_to !✓ |character |character | |pays_tribute_to = ROOT |Characters |- |personal_opinion !✓ |character |clause |Similar to opinion, but does not take state diplomacy, laws or any other such state concerns into account |<pre>personal_opinion = { who = FROM value = 0}</pre> |Opinion |- |personal_opinion_diff !✓ |character |clause |Similar to opinion_diff, but does not take state diplomacy, laws or any other such state concerns into account |<pre>personal_opinion_diff = { first = ROOT second = liege value = 5}</pre> |Opinion |- |personality_traits !✓ |character |int |Number of traits with <code>personality = yes</code> |NOT = { personality_traits = 5 } |Traits |- |piety !✓ |character |int |The amount of piety a character has. | |Characters |- |plot_is_known_by !✓ |character |character |Tests if a plot is known by another character |plot_is_known_by = ROOT |Objectives |- |plot_power !✓ |character |double |Typically ranges from 0.5 to 4.0 in vanilla | |Objectives |- |plot_power_contribution !✓ |character |clause | |plot_power_contribution = {plotter = ROOT power = 0.025} |Objectives |- |population !✓ |character |int | |population = 10000 |Clans |- |population_and_manpower !✓ |character |int | |population_and_manpower = 10000 |Clans |- |population_factor !✓ |character |double |Percentage of maximum population. |population_factor = 0.9 # 90% of max |Clans |- |port !✓ |province |bool |Checks for coastal provinces. | |Provinces |- |prev_policy !✓ |offmap |policy |Checks if the scoped offmap power previously had the specified offmap policy. |<pre>has_policy = china_isolationist</pre> |Offmap |- |prev_policy_flag !X |offmap |string |Checks if the scoped offmap power previously had the specified flag in its previous offmap status modifier's <code>flags</code> list. |<pre>prev_policy_flag = disallow_troops</pre> |Offmap |- |prev_status !✓ |offmap |status |Checks if the scoped offmap power previously had the specified offmap status modifier. |<pre>prev_status = china_plague</pre> |Offmap |- |prev_status_flag !X |offmap |string |Checks if the scoped offmap power previously had the specified flag in its previous offmap status modifier's <code>flags</code> list. |<pre>prev_status_flag = disallow_troops</pre> |Offmap |- |preparing_invasion !✓ |character |bool | | |Wars |- |practical_age !X |character |int |Checks the apparent age of the character, taking immortality into account -- e.g., if the character became immortal at age 40, this will yield 40 rather than their true age. |practical_age > 40 |Health |- |prestige !✓ |character |int |The amount of prestige a character has. | |Characters |- |prisoner !✓ |character |bool |If no, can't be applied to imprisoned characters. Can also be used as an event [[pre-trigger]]. | |Characters |- |province !✓ |province |province |Checks currently scoped province to be the same as another. |<pre> ROOT = { capital_scope = { province = PREVPREV } } </pre> |Provinces |- |province_id !✓ |province |int |Checks if the scoped province has given province ID. | |Provinces |- |quality !✓ |artifact |int |Checks if if the quality of the scoped artifact compares correctly to the given value. All comparison operators are available ( <, <=, =, >=, >=). |quality == 4 |Artifacts |- |race !✓ |character |culture/character |Same as <code>culture</code> condition. Checks if a character's culture matches that of a specified culture or character. This is different from <code>graphical_culure</code>, i.e when comparing two cultures that have the same culturegfx, <code>race</code> still evaluates to false. |<code>race = horse</code> |Character |- |random !✓ |any |int |Chance of success is (100-N)%! |random = 85 |Control |- |real_month_of_year !✓ |any |int |Checks for actual IRL month (contrary to <code>month</code> which checks it in-game). Ranges from 0 (January) to 11 (December) |real_month_of_year = 11 |Control |- |real_tier !X |character/title |character/title/tier |Same as ''tier'' but ignores temporary titles | |Tier |- |realm_character_percent !X |character |clause |Returns true if the percentage of characters in the scoped character's realm fulfilling the condition is equal to or greater than the target. |<code>character_realm_percent = { target = 0.05 has_trait = genius }</code> |Rulers |- |realm_diplomacy !✓ |character |int |State diplomacy. For personal attribute, see <code>diplomacy</code>. | |Rulers |- |realm_intrigue !✓ |character |int |State intrigue. For personal attribute, see <code>intrigue</code>. | |Rulers |- |realm_learning !✓ |character |int |State learning. For personal attribute, see <code>learning</code>. | |Rulers |- |realm_levies !✓ |character |int | |NOT = { realm_levies = 6000 } |Warfare |- |realm_levy_diff !✓ |character |clause | |realm_levy_diff = { who = ROOT value = 3000 } |Warfare |- |realm_martial !✓ |character |int |State martial. For personal attribute, see <code>martial</code>. | |Rulers |- |realm_size !✓ |character |int |Total number of landed titles in the realm |realm_size = 180 |Rulers |- |realm_stewardship !✓ |character |int |State stewardship. For personal attribute, see <code>stewardship</code>. | |Rulers |- |rebel !✓ |character/title |bool | | |Characters |- |region !✓ |title,province |region |Checks if scope belongs to a geographical region. |region = world_africa_east |Province |- |regional_percentage !✓ |any |clause |Checks if the percentage of provinces in a particular region meets a set of conditions |<pre>regional_percentage = { region = world_india percentage = 0.5 OR = { religion = hindu religion = jain } }</pre> |Province |- |relative_income_to_liege !✓ |character |float |Compares the income of character and of his liege |<code>relative_income_to_liege = 0.5</code> |Money |- |relative_power !✓ |character |clause |Check that currently scoped character has at least ''power'' percentage of ''who'''s power. |relative_power = { who = FROM power = 4.0 } |Rulers |- |relative_power_including_allies_attacker !✓ |character |clause |Check that currently scoped character (plus its potential allies in an offensive war) have at least ''power'' percentage of ''who'''s power. |<pre> relative_power_including_allies_attacker = { who = FROMFROM # Defender power = 0.8 } </pre> |Rulers |- |relative_power_including_allies_defender !✓ |character |clause |Check that currently scoped character (plus its potential allies in a defensive war) have at least ''power'' percentage of ''who'''s power. |<pre> relative_power_including_allies_defender = { who = FROM # Attacker power = 2 } </pre> |Rulers |- |relative_power_to_liege !✓ |character |double | |any_realm_lord = { relative_power_to_liege = 0.1 } |Vassalage |- |relative_realm_size !✓ |character |clause |(2.8) Compares the realm size of the scoped character with the character specified by ''who''. Can use comparison operators (<nowiki>=, >, <, <=, >=, ==</nowiki>). |<pre>relative_realm_size = { who = ROOT size < 1 }</pre> |Rulers |- |religion !✓ |character/province |religion |Checks if character/province has the given religion | |Religion |- |religion_allows_female_temple_holders !✓ |character |bool |Checks religion flag allows_female_temple_holders |<code>religion_allows_female_temple_holders = yes</code> |Religion |- |religion_allows_male_temple_holders !✓ |character |bool |Checks religion flag allows_male_temple_holders |<code>religion_allows_male_temple_holders = yes</code> |Religion |- |religion_authority !✓ |character/province |double |Ranges from 0 to 1 | |Religion |- |religion_group !✓ |character/province |religion |Checks if character's/province's religion belongs to the given religion group | |Religion |- |republic_total_num_of_trade_posts !✓ |character |int | |republic_total_num_of_trade_posts = 80 | |- |reverse_clan_opinion !✓ |character |clause | |<pre> reverse_clan_opinion = { who = FROM value = 25 } </pre> |Opinion |- |reverse_has_opinion_modifier !✓ |character |clause |Checks if 'who' character has the given [[modifiers|opinion modifier]] towards scoped character |reverse_has_opinion_modifier = { who = ROOT modifier = opinion_supported_pope } |Opinion |- |reverse_has_truce !✓ |character |character | |liege = { reverse_has_truce = ROOT } |Wars |- |reverse_opinion !✓ |character/new |clause |Checks if who's opinion of the scope is at least value. new can be used to reference the new_character scope. |reverse_opinion = { who = ROOT value = 0} |Opinion |- |reverse_personal_opinion !✓ |character |clause |Similar to reverse_opinion, but does not take state diplomacy, laws or any other such state concerns into account |reverse_personal_opinion = { who = FROM value = 50} |Opinion |- |reverse_personal_opinion_diff !X |character |clause |Does not take state diplomacy, laws or any other such state concerns into account | |Opinion |- |revolt_risk !✓ |province |double | |revolt_risk = 0.02 |Provinces |- |rightful_religious_head !✓ |character |character | |any_independent_ruler = { rightful_religious_head = ROOT } |Religion |- |risks_minor_clan_rising !✓ |character |bool | |risks_minor_clan_rising = yes |Clans |- |ruled_years !✓ |character/title |int | | |Rulers |- |same_guardian !✓ |character |character | |any_courtier = { same_guardian = ROOT } |Guardianship |- |same_liege !✓ |character |character | |any_realm_lord = { same_liege = ROOT } |Vassalage |- |same_realm !✓ |character/title |character | |<pre> any_neighbor_province = { owner = { same_realm = ROOT } } </pre> |Rulers |- |same_sex !✓ |character |character |Checks if two characters have same sex. |same_sex = FROM |Characters |- |same_regnal_name !X |character |character |Checks if two characters have the same regnal name for numbering purposes. Regnal names are currently defined as having the same first first name (E.G., "Gustav" and "Gustav Adolf" are the same regnal name), or the same cultural first first name (E.G., "Alfr_Alf" and "Alf_Alf" are the same regnal name). | |Characters |- |same_society_as !✓ |character |character |Checks if scope character is in the same society as target character. |same_society_as = ROOT |Societies |- |scaled_wealth !✓ |character |double/clause |Check if character has the given wealth based on percentage of yearly income. Before 2.8, the clause syntax is not available. |scaled_wealth = 0.2<br/> scaled_wealth = { value = 0.5 min = 10 max = 20 } |Money |- |score !✓ |character |int |Current score of the player |score = 100000 | |- |secret_religion !✓ |character |religion |Checks if character secretly follows the given religion |secret_religion = catholic |Religion |- |secret_religion_group !✓ |character |religion group |Checks if character secretly follows a religion in the given religion group |secret_religion_group = christian |Religion |- |shares_any_bloodline_with !X |character |character |Returns true is both characters have at least one bloodline in common | |Bloodlines |- |shares_realm_border_with !✓ |character |character |(2.8) Checks if any province in your realm (everything under your titles) borders any province in their realm. | |Realm |- |sibling !✓ |character |character | | |Family |- |society_can_rank_down !X |character |bool |Checks if the character can rank down within their society |society_can_rank_down = yes |Societies |- |society_can_rank_up !✓ |character |bool |Checks if the character can rank up within their society |society_can_rank_up = yes |Societies |- |society_currency !✓ |character |society |Checks if character has the given number of society points. Can add a scaled_by_influence parameter to scale by society influence, going from a 70% reduction when the society is at 100% influence and going linearly to a 0% reduction at 0% influence |society_currency >= 1000 |Societies |- |society_has_active_progress !✓ |society |bool |Checks if the society currently has an ongoing progress counter. |<code>society_has_active_progress = yes</code> |Societies |- |society_has_members !✓ |society |bool |Checks if the society has any members. |<code>society_has_members = yes</code> |Societies |- |society_influence !✓ |society/character/any |int/clause |Checks if a given society's influence compares to the given number. If no society name is given, it will use either the society in the current scope, or the society of the character in the current scope. If no society name is given, and the current scope is neither a society nor a character, it will always return false. |<code>society_influence >= 70 society_influence = { society = the_assassins value = 50 }</code> |Societies |- |society_is_active !X |society |bool |Checks if the society's active trigger is true. |<code>society_is_active = yes</code> |Societies |- |society_is_criminal !✓ |character |bool |Checks if character's society is criminal or not. |society_is_criminal = no |Societies |- |society_is_devil_worshiper !✓ |character |bool |Checks if character's society is a devil worshiping society or not. |society_is_devil_worshiper = no |Societies |- |society_member_of !✓ |character |society |Checks if character belongs to the given society |society_member_of = monastic_order_buddhist |Societies |- |society_progress !✓ |society |float |Checks the society's current progress. Takes comparison operators. |<code>society_progress < 25</code> |Societies |- |society_rank !✓ |character/int/clause |society |Checks if character's rank compares correctly to the value or character given. Works with all comparison operators ( <, <=, =, >=, >=). Can use clause to additionally check if character belongs to named society. |<code>society_rank == 2 society_rank = { society = the_assassins rank == 3 }</code> |Societies |- |start_date !✓ |any |date |Check the initial start date of current game. |start_date = 1066.9.15 |Control |- |stewardship !✓ |character |int |A character's Stewardship attribute. For state value, see <code>realm_stewardship</code> | |Characters |- |supply_limit !X |province |clause |Compares the supply in the province for a given character and their leader against a value. The leader defaults to the given character unless specified. WARNING: Syntax untested yet, seems weird. |<pre> supply_limit = { for = ROOT leader = FROM value > 10 }</pre> |Wars |- |supported_checksum !X |any |bool |Checks to see if current checksum matches at least one supported checksum in the .mod files of any active mods (defined by supported_checksums = { ABCD EFGH } field). | |Control |- |symptom !X |character |trait (?) | | |Health |- |TECH_LIGHT_INFANTRY TECH_HEAVY_INFANTRY TECH_CAVALRY TECH_SIEGE_EQUIPMENT TECH_SHIPBUILDING TECH_MILITARY_ORGANIZATION TECH_CASTLE_INFRASTRUCTURE TECH_TOWN_INFRASTRUCTURE TECH_CHURCH_INFRASTRUCTURE TECH_IMPROVED_KEEPS TECH_TRADE_PRACTICES TECH_CONSTRUCTION TECH_NOBLE_CUSTOMS TECH_POPULAR_CUSTOMS TECH_RELIGIOUS_CUSTOMS TECH_MAJESTY TECH_TOLERANCE TECH_LEGALISM !✓ |province, holding |int |Check whether the current holding or province has at least this level of technology in a particular tech category. |TECH_POPULAR_CUSTOMS = 3 |Provinces |- |technology_can_spread !✓ |province |bool |Check whether technology can spread in the province. |technology_can_spread = yes |Province |- |temporary !✓ |title |bool |Check if title is temporary one (revolt, claimant adventurer, ...) | |Titles |- |terrain !✓ |province |terrain |Values: forest, hills, mountain, plains, farmlands, steppe, desert, jungle, arctic | |Provinces |- |their_opinion !✓ |character |clause | |their_opinion = { who = ROOT value = 25 } |Opinion |- |tier !✓ |character/title |string |Values: baron, count, duke, king, emperor |Checks if the character's tier is exactly equivalent to the specified tier. Does not permit the use of 2.8+ comparison operators! |Tier |- |title !✓ |character/title |title/province | |title = d_mesopotamia |Titles |- |total_claims !✓ |character |clause | |<code>total_claims = { who = FROM strong = yes value = 2}</code> |Claims |- |total_years_played !✓ |Any |int |Number of years since beginning of current game |<code>total_years_played = 200</code> |Control |- |trade_post_has_building !✓ |province |building |Checks if a trade post has the specified building. |<code>trade_post_has_building = tr_silk_road_3</code> |Buildings |- |trade_post_has_any_building !X |province |building |Checks if a trade post has at least 1 building. | |Buildings |- |trade_route !✓ |province |trade route |Checks if a province is on the specified trade route. |<code>trade_route = silk_road</code> |Provinces |- |trade_route_control !✓ |character |clause |(2.8) Checks the amount of control of the scoped character (others?) over the specified trade route's wealth, provinces, trade posts, or trade post locations. {|class="wikitable" !Parameter !! Type !! Description |- |trade_route || identifier || Required. Trade route to check against. |- |value || float || Required. Percentage of control required. Accepts comparison operators (=, <, <=, >, >=, ==). |- |type || string || Optional. Type of comparison: "wealth", "provinces", "trade_posts", or "trade_post_locations". The latter two are restricted by the trade post trigger in the trade route definition. Defaults to wealth. |- |indirectly_owned || bool || Optional. Whether to include provinces in one's sub-realm that are owned by vassals. Defaults to yes. |- |} |<pre>trade_route_control = { trade_route = silk_road value > 0.1 type = trade_post_locations indirectly_owned = no }</pre> |Provinces |- |trait !✓ |character |string |Checks if the character has this trait |<code>trait = shy</code> |Traits |- |treasury !✓ |character |double | |<code>treasury = 50</code> |Money |- |true_religion !✓ |character |religion |If the character has a secret religion, checks if character secretly follows the given religion, otherwise checks if the character publicly follows the given religion |true_religion = catholic |Religion |- |true_religion_group !✓ |character |religion group |If the character has a secret religion, checks if character secretly follows a religion in the given religion group, otherwise checks if the character publicly follows a religion in the given religion group |true_religion_group = christian |Religion |- |troops !✓ |siege |clause | |<code>troops = { who = troops value = 0.1 enemy = yes}</code> |Wars |- |unit_is_in_combat !X |unit |bool |Checks if the unit is in combat. | |Units |- |unused_manpower !✓ |character |int | |<code>unused_manpower = 250</code> |Clans |- |uses_decadence !✓ |character |bool |Character has decadence mechanic via religion/government. |<code>uses_decadence = yes</code> |Characters |- |using_cb !✓ |war |casusBelli | |<code>any_war = { using_cb = crusade}</code> |Wars |- |vassal_of !✓ |character |character | |<code>any_rival = { vassal_of = ROOT }</code> |Vassalage |- |war !✓ |character |bool |Checks if the character is in war | |Wars |- |war_participation !X |war |double | |<code>any_war = { war_participation = { who = ROOT score = 0.5 } }</code> |Wars |- |war_score !✓ |war |double | |<code>any_war = { war_score = 50 }</code> |Wars |- |war_title !✓ |war |title/province | |<code>war_title = ROOT</code> |Wars |- |war_with !✓ |character |character/title |Returns true if people are hostile due to raiding or if their armies are hostile because of a personal, liege or third party war.<ref>[[forum:874495/page-17#post-20709564]]</ref> |<code>liege = { NOT = { war_with = ROOT } }</code> |Wars |- |was_conceived_a_bastard !✓ |character |bool | |<code>was_conceived_a_bastard = yes</code> |Family |- |wealth !✓ |character |int |The minimum amount of gold this character should have | |Money |- |will_liege_enforce_peace !✓ |character |bool |See also <code>has_liege_enforced_peace</code> |<code>will_liege_enforce_peace = no</code> |Realm |- |would_be_heir_under_law !✓ |title |clause | |would_be_heir_under_law = { who = FROM law = seniority } |Government |- |year !✓ |any |int |Returns the current year. | |Control |- |year_of_birth !X |character |int |Checks if the character was born in this year or later |year_of_birth = 1000 |Characters |- |yearly_income !✓ |character/title (holding) |double | |yearly_income = 25 |Money |- |} ==See also== *[[Scopes]] *[[Commands]] ==References== <references/> [[Category:Modding]] [[Category:Lists]] {{ModdingNavbox}}
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:ModdingNavbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Sup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
条件
。
×
登录
密码
记住登录
加入王国风云2百科
忘记密码?
其他方式登录