Template:Script event targets/doc

这是Template:Script event targets的模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。


Script event targets creates tables of event targets from the game's script_docs.

Parameters

Parameter Description Required Default
category Selects a table category, valid options are:
  • all
  • regular (excludes wild card)
  • from (must use scope parameter)
  • to (must use scope parameter)
  • data
  • wild card
optional regular
scope Limits effects to ones relevant to the scope
Valid scopes are most game objects, such as pop or character
optional all scopes
noCollapse If set to anything, prevents table from starting collapsed optional none

Examples

{{Script event targets|scope=law}} results in

List of law event targets
Event target Description From scope To scope
active_law Scope to the scoped country's active law in the named law group (active_law:lawgroup_trade_policy) country law
currently_active_law_in_group Scope from a law to the currently active law in that group law law
currently_enacting_law Scope from a country to the law that they're currently enacting country law
imposed_law Scope from a country to the law currently imposed on them (enacting or not) country law
imposer_of_law Scope from a country to the country currently imposing a law on them country, law country
owner Scope to the owner country of object building, character, company, country, decree, institution, interest_group, interest_marker, journal_entry, law, market, market_goods, military_formation, new_combat_unit, political_movement, pop, province, state country
type Scope from an object to its type building, company, diplomatic_catalyst, diplomatic_play, harvest_condition_area, institution, interest_group, law, political_lobby, political_movement building_type, company_type, diplomatic_play_type, harvest_condition_type, institution_type, interest_group_type, law_type, political_movement_type

{{Script event targets|category=wild card}} results in

List of wild card event targets
Event target Description From scope To scope
compare_complex_value A comparison trigger that needs a parsable string parameter that will return its value in the context it is used eg: scope:root.number_of(armies) varies value
compare_value A comparison trigger that will return its value in the context it is used eg: root.gold varies value
named_script_value A script value that will calculate and returns its value in the context it is used none color, value
value A numeric literal value eg: 1, 5.2, -6 none value