Name
|
Description
|
Input Scopes
|
Output Scopes
|
Requires Data
|
Global Link
|
religion
|
Scope to country or country definition's primary religion or pop religion
|
country, pop, character, country_definition
|
religion
|
|
|
region
|
Scope to the strategic region of the object!
|
state, province, building, interest_marker, diplomatic_play, state_region
|
strategic_region
|
|
|
building
|
Scope to the related building
|
combat_unit
|
building
|
|
|
commander
|
Scope to the related commander
|
combat_unit
|
character
|
|
|
morale
|
Get the scoped combat unit's morale (0-1)
|
combat_unit
|
value
|
|
|
mg
|
Scope from a market to the MarketGoods with the specified key
|
market
|
market_goods
|
yes
|
|
participants
|
Get the total number of participating countries in the scoped market
|
market
|
value
|
|
|
trade_center
|
Scope to the trade center state of the market!
|
market
|
state
|
|
|
interest_group
|
Scope to the interest group of the character!
|
character
|
interest_group
|
|
|
num_battalions
|
Returns the number of battalions under a commander
|
character
|
value
|
|
|
num_mobilized_battalions
|
Returns the number of fully mobilized units under a General
|
character
|
value
|
|
|
num_units
|
Get the current of units for a commander
|
character
|
value
|
|
|
num_units_not_in_battle
|
Get the current of units for a commander that is NOT in battle
|
character
|
value
|
|
|
opposing_commander
|
Scope from a character in battle to the character on the other side of the battle
|
character
|
character
|
|
|
popularity
|
Get the scoped character's popularity, normally ranging between -100 and +100
|
character
|
value
|
|
|
battle
|
Scope from a battle side to the battle itself
|
battle_side
|
battle
|
|
|
province
|
Scope from a battle side to the province in which the battle is being fought
|
battle_side
|
province
|
|
|
front
|
Scope to the front where a battle takes place / where a character is located
|
character, battle
|
front
|
|
|
actor_market
|
Scope to the actor market of the trade route
|
trade_route
|
market
|
|
|
exporter
|
Scope to the exporting market of the trade route
|
trade_route
|
market
|
|
|
importer
|
Scope to the importing market of the trade route
|
trade_route
|
market
|
|
|
target_market
|
Scope to the target market of the trade route
|
trade_route
|
market
|
|
|
average_defense
|
Returns the average defense of units on Front on the same side as Country
|
front
|
value
|
yes
|
|
average_offense
|
Returns the average offense of units on Front on the same side as Country
|
front
|
value
|
yes
|
|
front_length
|
Returns the number of provinces in Front
|
front
|
value
|
|
|
num_defending_battalions
|
Returns the total number of defending units on Front on the same side as Country
|
front
|
value
|
yes
|
|
num_enemy_units
|
Gets the number of enemy units a commander is facing on a front
|
front
|
value
|
yes
|
|
num_total_battalions
|
Returns the total number of units on Front on the same side as Country
|
front
|
value
|
yes
|
|
num_provinces
|
Get the scoped entity's current number of provinces
|
state, state_region, front
|
value
|
|
|
state
|
Scope to the state of the object
|
province, pop, building, market
|
state
|
|
|
active_diplomatic_play
|
Scope to the diplomatic play of a country or strategic region
|
country, strategic_region
|
diplomatic_play
|
|
|
array_define
|
Name|Index. Index is 0-based.
|
|
value
|
yes
|
yes
|
c
|
Scope to the country with specified tag
|
|
country
|
yes
|
yes
|
cd
|
Scope to the country definition with specified tag
|
|
country_definition
|
yes
|
yes
|
compare_value
|
A comparison trigger that will return its value in the context it is used eg: root.gold
|
|
value
|
|
|
cu
|
Scope to the culture with specified key
|
|
culture
|
yes
|
yes
|
define
|
Name
|
|
value
|
yes
|
yes
|
flag
|
Flag literals eg: flag:the_boss
|
|
flag
|
yes
|
yes
|
g
|
Scope to the goods with specified key
|
|
goods
|
yes
|
yes
|
global_gdp
|
Get the global yearly predicted GDP
|
|
value
|
|
|
global_var
|
Reference a previous set global variable via its name eg: global_var:important_thing
|
|
|
yes
|
yes
|
infamy_threshold
|
Scope to infamy level threshold for comparison purposes (infamy_threshold:infamous)
|
|
value
|
yes
|
|
is_setup
|
Scope to true/false if gamestate is being initialized!
|
|
value
|
|
yes
|
je_tutorial
|
Scope to the active tutorial lesson's journal entry (do not use this outside tutorial)
|
|
journalentry
|
|
|
law_type
|
Scope to a law type from its name (law_type:law_protected_speech)
|
|
law_type
|
yes
|
|
local_var
|
Reference a previous set local variable via its name eg: local_var:person_of_interest
|
|
|
yes
|
yes
|
named_script_value
|
A script value that will calculate and returns its value in the context it is used
|
|
value
|
|
|
no
|
Boolean literal for false values
|
|
bool
|
|
yes
|
p
|
Scope to province specified by hex key
|
|
province
|
yes
|
yes
|
player
|
Scope to the player (do not use this outside tutorial)
|
|
country
|
|
|
pop_type
|
Scope to a pop type from its name (pop_type:laborers)
|
|
pop_type
|
yes
|
|
prev
|
The previous scope
|
|
|
|
yes
|
rank_value
|
Scope to rank value of a particular country rank (rank_value:great_power)
|
|
value
|
yes
|
|
rel
|
Scope to the religion with specified key
|
|
religion
|
yes
|
yes
|
relations_threshold
|
Scope to relations threshold level for comparison purposes (relations_threshold:warm)
|
|
value
|
yes
|
|
root
|
The head of the current top scope eg: reciever of an event, taker of a decision
|
|
|
|
yes
|
s
|
Scope to state region specified by key
|
|
state_region
|
yes
|
yes
|
scope
|
Reference a previously saved scope via its name eg: scope:target
|
|
|
yes
|
yes
|
sr
|
Scope to the strategic region of specified key
|
|
strategic_region
|
yes
|
yes
|
tension_threshold
|
Scope to tension level threshold for comparison purposes (tension_threshold:warm)
|
|
value
|
yes
|
|
this
|
The current scope
|
|
|
|
|
value
|
A numeric literal value eg: 1, 5.2, -6
|
|
value
|
|
yes
|
var
|
Reference a previous set variable via its name eg: var:mortal_enemy
|
|
|
yes
|
|
yes
|
Boolean literal for true values
|
|
bool
|
|
yes
|
modifier
|
Scope to the value of the modifier type of specified key belonging to the current object
|
country, state, building, interest_group, market, character
|
value, bool
|
yes
|
|
combat_width
|
Scope to combat width multiplier of scope province
|
province
|
value
|
|
|
land_hq
|
Returns local land HQ
|
province
|
hq
|
|
|
naval_hq
|
Returns local navy HQ
|
province
|
hq
|
|
|
active_law
|
Scope to the scoped country's active law in the named law group (active_law:lawgroup_trade_policy)
|
country
|
law
|
yes
|
|
ai_army_comparison
|
Scope to comparative army strength between two countries (example: value = ai_army_comparison:root)
|
country
|
value
|
yes
|
|
ai_gdp_comparison
|
Scope to comparative GDP between two countries (example: value = ai_army_comparison:root)
|
country
|
value
|
yes
|
|
ai_ideological_opinion
|
Scope to AI ideological opinion of scope country on target country (example: value = ai_ideological_opinion:root)
|
country
|
value
|
yes
|
|
ai_navy_comparison
|
Scope to comparative navy strength between two countries (example: value = ai_navy_comparison:root)
|
country
|
value
|
yes
|
|
army_size
|
Number of battalions of scope country.
|
country
|
value
|
|
|
building_levels
|
Get the total number of non-subsistence building levels of the scoped country
|
country
|
value
|
|
|
capital
|
Scope to the capital state of a country
|
country
|
state
|
|
|
civil_war_origin_country
|
Scope to the origin country of a civil war country
|
country
|
country
|
|
|
colonial_growth_per_colony
|
Scope to the country's colonial growth per colony value (example: colonial_growth_per_colony > 0)
|
country
|
value
|
|
|
country_definition
|
Scope to country's definition
|
country
|
country_definition
|
|
|
credit
|
Scope to the current amount of max credit the country can take
|
country
|
value
|
|
|
currently_enacting_law
|
Scope from a country to the law that they're currently enacting
|
country
|
law
|
|
|
decree_cost
|
Scope to a country's cost for a certain decree
|
country
|
value
|
yes
|
|
government_size
|
Get the scoped country's current number of Parties & independent IGs in government
|
country
|
value
|
|
|
heir
|
Scope to the heir of a country
|
country
|
character
|
|
|
ig
|
Scope to the interest group of specified key belonging to the country
|
country
|
interest_group
|
yes
|
|
income
|
Get the current weekly income of the scoped country
|
country
|
value
|
|
|
infamy
|
Scope to infamy of scope country (example: infamy >= 2)
|
country
|
value
|
|
|
institution
|
Scope to a country's institution from its name (institution:institution_health_system)
|
country
|
institution
|
yes
|
|
je
|
Scope to the journal entry of specified key belonging to the country
|
country
|
journalentry
|
yes
|
|
legitimacy
|
Scope to the current amount of legitimacy in country
|
country
|
value
|
|
|
market_capital
|
Scope to the market capital of a country
|
country
|
state
|
|
|
navy_size
|
Number of warships of scope country.
|
country
|
value
|
|
|
num_active_declared_interests
|
Scope to the number of active declared interests a country has
|
country
|
value
|
|
|
num_active_interests
|
Scope to the number of active interests a country has
|
country
|
value
|
|
|
num_active_natural_interests
|
Scope to the number of active natural interests a country has
|
country
|
value
|
|
|
num_active_plays
|
Get the current number of active Diplomatic Plays the scoped country started
|
country
|
value
|
|
|
num_admirals
|
Scope to the country's number of admirals
|
country
|
value
|
|
|
num_alliances
|
Scope to the number of alliances target country has in total (example: num_alliances:root >= 2)
|
country
|
value
|
|
|
num_alliances_and_defensive_pacts_with_allies
|
Scope to the number of alliances target country has with allies of scope country (example: num_alliances_and_defensive_pacts_with_allies:root >= 2)
|
country
|
value
|
yes
|
|
num_alliances_and_defensive_pacts_with_rivals
|
Scope to the number of alliances & defensive pacts target country has with rivals of scope country (example: num_alliances_and_defensive_pacts_with_rivals:root >= 2)
|
country
|
value
|
yes
|
|
num_characters
|
Scope to the country's number of characters
|
country
|
value
|
|
|
num_colony_projects
|
Get the scoped country's current number of incomplete / in progress colony projects
|
country
|
value
|
|
|
num_commanders
|
Scope to the country's number of commanders
|
country
|
value
|
|
|
num_convoys_available
|
Get the scoped country's current number of available convoys
|
country
|
value
|
|
|
num_convoys_required
|
Get the scoped country's current number of required convoys
|
country
|
value
|
|
|
num_declared_interests
|
Scope to the number of declared interests a country has (including inactive)
|
country
|
value
|
|
|
num_defensive_pacts
|
Scope to the number of defensive pacts target country has in total (example: num_defensive_pacts >= 2)
|
country
|
value
|
|
|
num_generals
|
Scope to the country's number of generals
|
country
|
value
|
|
|
num_income_transfer_pacts
|
Scope to the number of income-transfering (to others) actions target country has in total (example: num_income_transfer_pacts >= 2)
|
country
|
value
|
|
|
num_incorporated_states
|
Get the scoped country's current number of incorporated states
|
country
|
value
|
|
|
num_interests
|
Scope to the number of interests a country has (including inactive)
|
country
|
value
|
|
|
num_mutual_trade_route_levels_with_country
|
Scope to the number of mutual trade route levels the two countries have to each others' owned markets (example: num_mutual_trade_routes_with_country:root >= 2)
|
country
|
value
|
yes
|
|
num_natural_interests
|
Scope to the number of natural interests a country has (including inactive)
|
country
|
value
|
|
|
num_obligations_earned
|
Scope from a country to the number of obligations others owe them (=which they have earned)
|
country
|
value
|
|
|
num_politicians
|
Scope to the country's number of politicians
|
country
|
value
|
|
|
num_positive_relations
|
Get the current number of countries with positive Relation with the scoped country
|
country
|
value
|
|
|
num_queued_constructions
|
Scope to the number of queued constructions target country has in total (example: num_queued_constructions >= 2)
|
country
|
value
|
|
|
num_rivals
|
Scope to the number of rivals target country has in total (example: num_rivals >= 2)
|
country
|
value
|
|
|
num_ruling_igs
|
Get the scoped country's current number of IGs in government
|
country
|
value
|
|
|
num_states
|
Get the scoped country's current number of states
|
country
|
value
|
|
|
num_trade_routes
|
Get the scoped country's current number of trade routes
|
country
|
value
|
|
|
num_treaty_ports
|
Get the scoped country's current number of treaty ports
|
country
|
value
|
|
|
num_unincorporated_states
|
Get the scoped country's current number of unincorporated states
|
country
|
value
|
|
|
overlord
|
Scope to the direct overlord of the country in scope
|
country
|
country
|
|
|
py
|
Scope to the active party of specified key belonging to the country
|
country
|
party
|
yes
|
|
relations
|
Scope to relations between two countries (example: relations:root >= 2)
|
country
|
value
|
yes
|
|
ruler
|
Scope to the ruler of a country
|
country
|
character
|
|
|
technology_being_researched
|
Scope to the current technology a country is researching
|
country
|
technology
|
|
|
techs_researched
|
Scope to the current amount of techs researched of a country
|
country
|
value
|
|
|
tension
|
Scope to tension between two countries (example: tension:root >= 2)
|
country
|
value
|
yes
|
|
top_overlord
|
Scope to the top overlord of the country in scope
|
country
|
country
|
|
|
pop_weight_modifier_scale
|
Get the Pop's weight modifier scale multiplier
|
pop
|
value
|
|
|
workplace
|
Scope to the workplace of a pop
|
pop
|
building
|
|
|
target
|
Scope to the target of the object
|
diplomatic_play, journalentry
|
|
|
|
level
|
Scope to the level of an object
|
building, trade_route
|
value
|
|
|
investment
|
Scope to current investment level in an institution (example: investment < investment_max)
|
institution
|
value
|
|
|
investment_max
|
Scope to the country's current maximum investment level in an institution (example: investment < investment_max)
|
institution
|
value
|
|
|
player_owed_obligation_days_left
|
Scope to number of days left on an obligation in diplomatic relations scope (example: obligation_days_left >= 2)
|
diplomatic_relations
|
value
|
|
|
scope_relations
|
Scope to relations value in diplomatic relations scope (example: scope_relations >= 2)
|
diplomatic_relations
|
value
|
|
|
scope_tension
|
Scope to tension value in diplomatic relations scope (example: scope_tension >= 2)
|
diplomatic_relations
|
value
|
|
|
attacker_side
|
Scope from a battle to the BattleSide corresponding to the attacker
|
battle
|
battle_side
|
|
|
defender_side
|
Scope from a battle to the BattleSide corresponding to the defender
|
battle
|
battle_side
|
|
|
market
|
Scope to the market of the object
|
country, state, province, building, market, market_goods, state_region
|
market
|
|
|
owner
|
Scope to the owner country of object
|
country, state, province, pop, building, interest_group, market, market_goods, interest_marker, character, institution, law, journalentry, trade_route, decree, combat_unit
|
country
|
|
|
attacker_warleader
|
Scope to the attacker warleader of a war
|
war
|
country
|
|
|
defender_warleader
|
Scope to the defender warleader of a war
|
war
|
country
|
|
|
slaves_role
|
Scope from building type to it's slaves role pop type
|
building_type
|
pop_type
|
|
|
desired_law
|
Scope to the law the scoped political movement wants to enact/preserve.
|
political_movement
|
law_type
|
|
|
leader
|
Scope to the leader of the interest group
|
interest_group
|
character
|
|
|
party
|
Scope to the party that an IG is supporting
|
interest_group
|
party
|
|
|
type
|
Scope from an object to its type
|
building, institution, law, commander_order
|
building_type, institution_type, law_type, commander_order_type
|
|
|
goods
|
Scope to the goods traded by a trade route
|
market_goods, trade_route
|
goods
|
|
|
momentum
|
Get the scoped party's raw momentum
|
party
|
value
|
|
|
b
|
Scope to the building of specified key in the state
|
state
|
building
|
yes
|
|
nf
|
Scope to a Decree of specified key applied to the state
|
state
|
decree
|
yes
|
|
state_region
|
Scope to the state region of a state
|
state
|
state_region
|
|
|
num_export_trade_routes
|
Get the scoped market good's current number of import trade routes owned by a market member
|
market_goods
|
value
|
|
|
num_import_trade_routes
|
Get the scoped market good's current number of import trade routes owned by a market member
|
market_goods
|
value
|
|
|
region_state
|
Unknown, add something in code registration
|
state_region
|
state
|
yes
|
|
goal_value
|
Scope to the journal entry's goal value
|
journalentry
|
value
|
|
|
num_garrison_units
|
Returns the number of units garrisoned in a HQ
|
hq
|
value
|
|
|
controller
|
Scope to the controller of the object
|
state, province
|
country
|
|
|
average_expected_sol
|
Get the average expected Standard of Living of the scope
|
country, state
|
value
|
|
|
average_sol
|
Get the average Standard of Living of the scope
|
country, state
|
value
|
|
|
gdp
|
Get the scoped country's yearly predicted GDP
|
country, state
|
value
|
|
|
initiator
|
Scope to the initiator of the object
|
diplomatic_play
|
country
|
|
|
war
|
Scope from a diplomatic play to its war
|
diplomatic_play
|
war
|
|
|
culture
|
Scope to pop's or character's culture
|
pop, character, combat_unit
|
culture
|
|
|