作用域

本頁面所適用的版本可能已經過時,最後更新於1.3



作用域

Scopes are a very important aspect of modding. If an effect or trigger isn't being used in the right scope, it will usually do absolutely nothing. There are few fundamental scope types. country, character, unit, subunit, region, governorship, area, state, province, pop, party, family, color, etc. Some of these are used much more than others, and some of them do not line up with current game terminology. unit refers to armies/navies, while subunit refers to individual cohorts. Region refers to Regions, but area refers to provinces, and provinces refer to territories (though some effects/triggers call territories as cities), governorship refers to the part of a region controlled by a single country, while state refers to the part of a province controlled by a single country. It can be a bit confusing to keep it all straight. You may have noticed that a whole bunch of the "effects" on the effects page and "triggers" on the trigger page are actually scopes or what might be called target links.

The new Jomini system is very dynamic, so while there is a list (incomplete) of useful scopes, scopes can be combined together to create new scopes.

效果列表

Note that this list has been generated programmatically from the output of the "script_docs" console command. Using script_docs, effects supported from multiple scopes are given as being supported from "none" scope only, but this is probably not the case.

名稱 描述 用法 支持的作用域 支持的目標
random_in_list Iterate through all items in list. list = name or variable = name random_in_list = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none
ordered_sub_unit Iterate through all subunits in a unit ordered_sub_unit = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } unit subunit
random_navy Iterate through all navies in a country random_navy = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country unit
every_area_province Iterate through all provinces in a area every_area_province = { limit = { <triggers> } <effects> } area province
random_pops_in_province Iterate through all pops in a province random_pops_in_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } province pop
ordered_country_state Iterate through all states in a country ordered_country_state = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country state
every_sibling Iterate through all siblings every_sibling = { limit = { <triggers> } <effects> } character character
every_country Iterate through all existing countries every_country = { limit = { <triggers> } <effects> } none country
random_ownable_province Iterate through all ownable provinces in the world random_ownable_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none province
every_region_area Iterate through all areas in a region every_region_area = { limit = { <triggers> } <effects> } region area
random_character Iterate through all characters in a country random_character = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country character
random_child Iterate through all children random_child = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character character
random_army Iterate through all armies in a country random_army = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country unit
every_subject Iterate through all subject countries every_subject = { limit = { <triggers> } <effects> } country country
random_region_state Iterate through all states in a region random_region_state = { limit = { <triggers> } (optional) weight = { mtth } <effects> } region state
random_neighbour_country Iterate through all neighbour countries random_neighbour_country = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country country
every_region_province Iterate through all provinces in a region every_region_province = { limit = { <triggers> } <effects> } region province
random_commander Iterate through all commanders in a country random_commander = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country character
random_successor Iterate through all successors in a country random_successor = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country character
ordered_family_member Iterate through all members of a family ordered_family_member = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } family character
random_neighbor_province Iterate through all neighbors of a province random_neighbor_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } province province
random_sub_unit Iterate through all subunits in a unit random_sub_unit = { limit = { <triggers> } (optional) weight = { mtth } <effects> } unit subunit
ordered_rival Iterate through all Rivals ordered_rival = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character character
ordered_governor_state Iterate through all states a governor is governor of ordered_governor_state = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character state
every_area_state Iterate through all states in a area every_area_state = { limit = { <triggers> } <effects> } area state
every_successor Iterate through all successors in a country every_successor = { limit = { <triggers> } <effects> } country character
ordered_region_province Iterate through all provinces in a region ordered_region_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } region province
ordered_countries_at_war_with Iterate through all countries at war with ordered_countries_at_war_with = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country country
every_area Iterate through all existing areas every_area = { limit = { <triggers> } <effects> } none area
every_unit_in_province Iterate through all units in a province every_unit_in_province = { limit = { <triggers> } <effects> } province unit
random_area_province Iterate through all provinces in a area random_area_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } area province
every_family Iterate through all families in a country every_family = { limit = { <triggers> } <effects> } country family
random_rival Iterate through all Rivals random_rival = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character character
ordered_character Iterate through all characters in a country ordered_character = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country character
ordered_sibling Iterate through all siblings ordered_sibling = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character character
random_allied_country Iterate through all allied countries random_allied_country = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country country
random_country_state Iterate through all states in a country random_country_state = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country state
ordered_subject Iterate through all subject countries ordered_subject = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country country
ordered_neighbour_country Iterate through all neighbour countries ordered_neighbour_country = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country country
every_allied_country Iterate through all allied countries every_allied_country = { limit = { <triggers> } <effects> } country country
random_friend Iterate through all friends random_friend = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character character
every_neighbor_province Iterate through all neighbors of a province every_neighbor_province = { limit = { <triggers> } <effects> } province province
every_rival Iterate through all Rivals every_rival = { limit = { <triggers> } <effects> } character character
every_countries_at_war_with Iterate through all countries at war with every_countries_at_war_with = { limit = { <triggers> } <effects> } country country
ordered_family Iterate through all families in a country ordered_family = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country family
random_support_as_heir Iterate through all supportasHeir random_support_as_heir = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character character
random_region_area Iterate through all areas in a region random_region_area = { limit = { <triggers> } (optional) weight = { mtth } <effects> } region area
random_country Iterate through all existing countries random_country = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none country
random_governor_state Iterate through all states a governor is governor of random_governor_state = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character state
random_family Iterate through all families in a country random_family = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country family
ordered_area Iterate through all existing areas ordered_area = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none area
every_region Iterate through all existing regions every_region = { limit = { <triggers> } <effects> } none region
random_area_state Iterate through all states in a area random_area_state = { limit = { <triggers> } (optional) weight = { mtth } <effects> } area state
ordered_region Iterate through all existing regions ordered_region = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none region
ordered_in_list Iterate through all items in list. list = name or variable = name ordered_in_list = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none
ordered_navy Iterate through all navies in a country ordered_navy = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country unit
ordered_allied_country Iterate through all allied countries ordered_allied_country = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country country
random_sibling Iterate through all siblings random_sibling = { limit = { <triggers> } (optional) weight = { mtth } <effects> } character character
random_region_province Iterate through all provinces in a region random_region_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } region province
ordered_in_local_list Iterate through all items in local list. list = name or variable = name ordered_in_local_list = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none
random_country_sub_unit Iterate through all subunits in all units in a country random_country_sub_unit = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country subunit
every_governorship_state Iterate through all states in a governorship every_governorship_state = { limit = { <triggers> } <effects> } governorship state
every_province Executes on every province none
ordered_pops_in_province Iterate through all pops in a province ordered_pops_in_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } province pop
ordered_commander Iterate through all commanders in a country ordered_commander = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country character
every_region_state Iterate through all states in a region every_region_state = { limit = { <triggers> } <effects> } region state
every_support_as_heir Iterate through all supportasHeir every_support_as_heir = { limit = { <triggers> } <effects> } character character
every_governor_state Iterate through all states a governor is governor of every_governor_state = { limit = { <triggers> } <effects> } character state
every_commander Iterate through all commanders in a country every_commander = { limit = { <triggers> } <effects> } country character
ordered_area_province Iterate through all provinces in a area ordered_area_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } area province
random_province Executes on a random province none
every_unit Iterate through all units in a country every_unit = { limit = { <triggers> } <effects> } country unit
every_in_global_list Iterate through all items in global list. list = name or variable = name every_in_global_list = { limit = { <triggers> } <effects> } none
ordered_army Iterate through all armies in a country ordered_army = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country unit
every_owned_province Iterate through all owned provinces in a country every_owned_province = { limit = { <triggers> } <effects> } country province
every_in_list Iterate through all items in list. list = name or variable = name every_in_list = { limit = { <triggers> } <effects> } none
ordered_unit_in_province Iterate through all units in a province ordered_unit_in_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } province unit
ordered_child Iterate through all children ordered_child = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character character
every_parent Executes on every parent character
random_unit_in_province Iterate through all units in a province random_unit_in_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } province unit
every_friend Iterate through all friends every_friend = { limit = { <triggers> } <effects> } character character
every_family_member Iterate through all members of a family every_family_member = { limit = { <triggers> } <effects> } family character
random_governorship_state Iterate through all states in a governorship random_governorship_state = { limit = { <triggers> } (optional) weight = { mtth } <effects> } governorship state
random_living_character Executes on a random living character none
ordered_ownable_province Iterate through all ownable provinces in the world ordered_ownable_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none province
ordered_country_sub_unit Iterate through all subunits in all units in a country ordered_country_sub_unit = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country subunit
every_country_sub_unit Iterate through all subunits in all units in a country every_country_sub_unit = { limit = { <triggers> } <effects> } country subunit
every_in_local_list Iterate through all items in local list. list = name or variable = name every_in_local_list = { limit = { <triggers> } <effects> } none
ordered_region_state Iterate through all states in a region ordered_region_state = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } region state
random_area Iterate through all existing areas random_area = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none area
random_subject Iterate through all subject countries random_subject = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country country
random_in_local_list Iterate through all items in local list. list = name or variable = name random_in_local_list = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none
ordered_support_as_heir Iterate through all supportasHeir ordered_support_as_heir = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character character
every_character Iterate through all characters in a country every_character = { limit = { <triggers> } <effects> } country character
add_charisma Adds charisma skill none
ordered_region_area Iterate through all areas in a region ordered_region_area = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } region area
every_sub_unit Iterate through all subunits in a unit every_sub_unit = { limit = { <triggers> } <effects> } unit subunit
ordered_owned_province Iterate through all owned provinces in a country ordered_owned_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country province
random_region Iterate through all existing regions random_region = { limit = { <triggers> } (optional) weight = { mtth } <effects> } none region
ordered_governorship_state Iterate through all states in a governorship ordered_governorship_state = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } governorship state
random_family_member Iterate through all members of a family random_family_member = { limit = { <triggers> } (optional) weight = { mtth } <effects> } family character
every_navy Iterate through all navies in a country every_navy = { limit = { <triggers> } <effects> } country unit
ordered_unit Iterate through all units in a country ordered_unit = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country unit
every_country_state Iterate through all states in a country every_country_state = { limit = { <triggers> } <effects> } country state
ordered_in_global_list Iterate through all items in global list. list = name or variable = name ordered_in_global_list = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none
random_list a random list effect random_list = { X1 = { trigger = { enables/disable this effect} modifier/compare_modifier/opinion_modifier = Y1 effect1 } X2 = { trigger = { enables/disable this effect} modifier/compare_modifier/opinion_modifier = Y2 effect2 } ... }

Selects one effect from the list and fires it. The effects are weighted by numbers X1, X2... (the higher the number, the higher the chance of the effect being picked).

The chances can be modified by optional value modifier lists Y1, Y2... (AKA MTTH)

none
every_neighbour_country Iterate through all neighbour countries every_neighbour_country = { limit = { <triggers> } <effects> } country country
every_state_province Iterate through all provinces in a state every_state_province = { limit = { <triggers> } <effects> } state province
every_living_character Executes on every living character none
ordered_country Iterate through all existing countries ordered_country = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } none country
ordered_state_province Iterate through all provinces in a state ordered_state_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } state province
every_child Iterate through all children every_child = { limit = { <triggers> } <effects> } character character
ordered_area_state Iterate through all states in a area ordered_area_state = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } area state
random_state_province Iterate through all provinces in a state random_state_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } state province
ordered_neighbor_province Iterate through all neighbors of a province ordered_neighbor_province = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } province province
every_pops_in_province Iterate through all pops in a province every_pops_in_province = { limit = { <triggers> } <effects> } province pop
every_army Iterate through all armies in a country every_army = { limit = { <triggers> } <effects> } country unit
random_unit Iterate through all units in a country random_unit = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country unit
random_countries_at_war_with Iterate through all countries at war with random_countries_at_war_with = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country country
random_owned_province Iterate through all owned provinces in a country random_owned_province = { limit = { <triggers> } (optional) weight = { mtth } <effects> } country province
ordered_friend Iterate through all friends ordered_friend = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } character character
ordered_successor Iterate through all successors in a country ordered_successor = { limit = { <triggers> } order_by = script_value position = int/min = int max = script_value <effects> } country character
current_ruler scopes to current ruler of country 國家 character
any_friend scopes to any friend of a character character character
employer scopes to country of character character 國家
any_owned_province scopes to any owned territory of a country 國家 省份
area scopes to province of that territory 省份 area
region scopes to the region of a province area region
owner scopes to the country owner from specified scope 省份, state, governorship 國家
character scopes to the character from a job job character
character_party scopes to the party of character character party
father scopes to the father of a character character character
mother scopes to the mother of a character character character
job scopes to the job of a character character job
preferred_heir scopes to the preferred heir of a character character character
next_in_family unknown character character
ruler scopes to ruler of the country a character is in character character
spouse scopes to the spouse of a character character character
文化組 scopes to a culture group, unclear how this would be used. 國家,character,province,pop,culture 文化組
國家 scopes to the country from specified scope types character, pop, job 國家
color1 scopes to first color of a country 國家 color
color2 scopes to second color of a country 國家 color
color3 scopes to third color of a country 國家 color
consort scopes to consort of ruler from country 國家 character
current_co_ruler scopes to co_ruler of ruler from country 國家 character
current_heir scopes to current heir from country 國家 character
fam scopes to family from country, more info needed. 國家 family
overlord scopes to overlord of country (It's possible for there to be vassals of vassals) 國家 國家
party scopes to party from country, more info needed 國家 party
primary_heir scopes to primary heir from country (unclear how this is different from current heir) 國家 character
secondary_heir scopes to secondary heir from country 國家 character
job_holder scopes to job holder from specified scopes, more info may be needed 國家, province, state, governorship character
governorship scopes to governorship from specified scopes 省份, state governorship
siege_controller scopes to country that controls a siege, unclear how it would be used. siege 國家
governor scopes to governor from specified scops 省份, state, governorship character
governor_or_ruler scopes to governor or ruler from specified scopes 省份, state, governorship character
location scopes to location from specified scopes character, siege, pop 省份
color scopes to color from specified scopes 國家, religion, culture group color
family_country scopes to country from family family 國家
head_of_family scopes to head of family from family family character
owning_unit scopes to unit from subunit subunit 單位
personal_loyalty scopes to character that has loyal subunit from subunit subunit character
capital_scope scopes to capital province from specified scopes 國家, state, governorship 省份
commander scopes to commander from unit 單位 character
單位_destination scopes to unit target destination from unit 單位 省份
單位_location scopes to unit location from unit 單位 省份
單位_next_location scopes to next province the unit is moving to from unit 單位 省份
單位_objective_location unknown, perhaps something using ai? 單位 省份
單位_owner scopes to country from unit 單位 國家
party_country scopes to country from party party 國家
party_leader scopes to party leader from party party character
controller scopes to province controller from province 省份 國家
dominant_province_culture scopes to dominant culture of province from province 省份 文化
dominant_province_culture_group scopes to dominant culture group of province from province 省份 文化組
siege scopes to siege from specified scopes 省份, unit siege
文化 scopes to culture from specified scopes 國家, character, province, pop 文化
宗教 scopes to religion from specified scopes 國家, character, province, pop 宗教
char:[character id] scopes to character using character id character
flag unknown, requires more info flag
c:[tag] scopes to a specific country using its tag 國家
p:[province id] scopes to a specific territory using its id number 省份
scope:[predefined_scope] scopes to a predefined scope variable defined earlier in the text.
VAR:[predefined variable] similar to scope:, but only used with predefined variables (which can be given scope values).
THIS scopes to your current scope. Useful for comparison calculations.
ROOT scopes to the original scope of whatever you're modding. For country event, this would be the country, for character events the character, etc.
PREV scopes to the scope one layer up. If you scoped from a country to a character, then using the PREV scope would scope back to that country.