Commands

From Crusader Kings II Wiki
(Redirected from Effects)
Jump to navigation Jump to search

Commands or effects are used in scripting to alter the target that was selected with scopes and conditions.

They appear in:

  • command blocks (the immediate and option sections of events, or similar: effect, creation_effect, gain_effect, success, ...)
  • scripted effects, which can be used to group commands into re-usable macro.

(Scripting) commands are different from console commands: though some console commands have a scripting equivalent, others do not (for instance player console command).

List of commands[edit]

Available commands depend on the current scope type.

Command Used in vanilla Used from scope Value type Description Example Category
abandon_heresy character/province bool Converts to the parent religion abandon_heresy = yes Religion
abdicate character bool/clause Abdicate to current heir abdicate = yes

abdicate = { move = no }

Government
abdicate_to character character Abdicate to an arbitrary character.

Note: to also transfer wealth, use the wealth and clear_wealth commands.

holder_scope = { abdicate_to = ROOT } Government
abdicate_to_most_liked_by character character FROM = { abdicate_to_most_liked_by = ROOT } Government
activate_disease any disease Activate a disease, which can now randomly appear. Note that there's no way to deactivate a disease. activate_disease = syphilis Health
activate_plot character bool For plots activated by decision hidden_tooltip = { activate_plot = yes } Plots
activate_title any clause Activate/deactivate a titular or de jure landed title. Unlike destroyed titles (destroy_landed_title), deactivated titles cannot be re-created by the player or AI, except through special decisions. activate_title = { title = d_hashshashin status = no } Titles
add_age character int Adds the given value to the age of the scoped character. Warning: messing with a character's age may have unintended side effects so use with caution. add_age = 3 Character
add_alliance X character clause Creates an alliance between characters. Also see break_alliance. add_alliance = { who = x days/months/years = y } Relations
add_ambition character ambition add_ambition = obj_become_chancellor Plots
add_artifact character artifact A copy of the named artifact is created and added to the scoped character add_artifact = golden_platypus Artifacts
add_betrothal X character Warn: buggy behavior Marriage
add_bloodline_member X bloodline character Add the specified character to the scoped bloodline Bloodlines
add_building title building Construct a building in a holding. Also constructs the buildings it upgrades from, based on upgrades_from. add_building = ct_shipyard_1 Holdings
add_character_modifier character clause Adds a character modifier. Specify duration using days, months, years, or duration = -1 (non-expiring). Can use optional fields hidden = yes and stacking = yes. add_character_modifier = { name = mod_bloodlust duration = 180 } Modifiers
add_claim title/character character/title Adds a strong, non-inheritable claim to a character.

Note: assigned value cannot be a scope reference to a title.[1]

ROOT = { # ROOT is character
   add_claim = k_france # Needs to be a titleID, PREV wouldn't work.
}
k_france = {
   add_claim = ROOT # ROOT is a character
}

county = { add_claim = ROOT }

Claims
add_consort character character Adds the given character as a consort to the scoped character. Marriage
add_custom_history wonder key Adds a history entry to the scoped great work. Wonders
add_evil_god_name religion key Adds an evil god name to the scoped religion. add_evil_god_name = LOKI Religion
add_favor character character Makes scoped character be owed a favor toward another character. Also see reverse_add_favor. add_favor = ROOT
add_friend character character add_friend = ROOT Relations
add_god_name religion key Adds a god name to the scoped religion. add_god_name = GOD_THE_ALLFATHER_2 Religion
add_holding_modifier holding modifier Adds a holding modifier. Can use optional field stacking = yes.
add_holding_modifier = {
	modifier = nomad_population_boom
	years = 8
	stacking = yes
}
Modifiers
add_holding_slot province int Adds N constructible settlement to a province. Can be negative. [2] add_holding_slot = 1 Holdings
add_law title law/clause Sets the specified law for the scoped title. Can optionally specify to ignore cooldown and opinion effects (i.e. on vassals), defaulting to yes. random_demesne_title = { add_law = centralization_0 }

add_law = { law = ze_administration_laws_2 cooldown = no opinion_effect = no }

Government
add_law_w_cooldown title law any_demesne_title = { add_law_w_cooldown = investiture_law_0 } Government
add_lover character character add_lover = PREV Marriage
add_objective X character objective add_objective = objective Plots
add_offmap_currency character clause Adds the specified value of offmap currency for the specified offmap power to the scoped character. Use a negative number to subtract. add_offmap_currency = { offmap = offmap_china value = 250 } Offmap
add_population_scaled character double Adds or subtracts a portion of the scope's population. add_population_scaled = -0.1 Clans
add_pressed_claim title/character character/title Adds a strong, inheritable claim. Note: assigned value cannot be a scope reference to a title.[1] primary_title = { add_pressed_claim = ROOT } Claims
add_province_modifier province clause Adds a province modifier add_province_modifier = { name = smugglers_ring duration = -1 } Modifiers
add_random_education_trait character attribute/1/2/3/4/yes Adds an education /trait matching specified attribute or level. add_random_education_trait = martial Character
add_rival character character Relations
add_society_modifier character clause Adds a timed modifier to the society of scoped character. Works with days and years. add_society_modifier = {

modifier = failed_mission years = 2 }

Societies
add_society_progress society float Adds a given value to the society's current progress. add_society_progress = 10 Societies
add_spouse character character add_spouse = FROM Marriage
add_spouse_matrilineal character character add_spouse_matrilineal = FROM Marriage
add_to_bloodline X character bloodline Add the scoped character to the RHS bloodline. Note that the RHS must be an existing bloodline, not a bloodline type. random_bloodline = { ROOT = { add_to_bloodline = PREV } } Bloodlines
add_to_extra_holding X province clause Construct a building in a special holding (hospital, fort or trade post). add_to_extra_holding = { type = trade_post building = tr_port_1 } Holdings
add_trait character trait Adds a trait to the character, using an ID from the traits files. Also see remove_trait. add_trait = skilled_tactician Traits
add_weak_claim character/title title/character Adds a weak, non-inheritable claim. Note: assigned value cannot be a scope reference to a title.[1] add_weak_claim = FROM Claims
add_weak_pressed_claim character/title title/character Adds a weak, inheritable claim. Note: assigned value cannot be a scope reference to a title.[1] add_weak_pressed_claim = FROM Claims
add_wonder_stage X wonder int Would add/complete the current stage. If a wonder is at stage 2, it'd add stage 3 completed. If it's in the process of adding a stage, it would ""merely"" complete that one. add_wonder_stage = 1 Wonders
add_wonder_upgrade X wonder string/bool Would add/complete the upgrade specified, or if used in an upgrade scope, complete currently scoped upgrade. add_wonder_upgrade = yes/no/<upgrade name> Wonders
add_wonder_upgrade_slots X wonder/upgrade int Increases the number of available upgrade slots add_upgrade_slots = 1 Wonders
adjective title string k_france = { adjective="" } Titles
adjust_siphon_factor title double Update the percentage of income that goes to the creator for a dynamic mercenary company. primary_title = { adjust_siphon_factor = -0.02 }
ambition_succeeds character bool ambition_succeeds = yes Plots
approve_law character/title law/title
  • approve_law = law starts a vote on a law
  • approve_law = title votes in favor of a law
primary_title = { approve_law = city_tax_0 }

approve_law = FROM

Government
back_plot character character ROOT = { back_plot = PREV } Plots
banish character bool Banish character to random court FROM = { banish = yes } Characters
banish_religion character religion All characters of the targeted religion will be banished to random court banish_religion = jewish Religion
become_heretic character bool Changes character religion to a random heresy of current religion become_heretic = yes Religion
become_secret_heretic X character bool Changes character religion to a heresy of their current religion, but still openly practices their current faith (i.e., similar to become_heretic, but in secret rather than openly). Religion
break_alliance character character Remove an alliance. Also see add_alliance break_alliance = FROM Relations
break_betrothal X character character break_betrothal = FROM Marriage
build_holding province clause Builds a new settlement in the province. build_holding = { title = b_masyaf type = castle holder = ROOT } Holdings
cancel_ambition character bool cancel_ambition = yes Plots
cancel_job_action character job_action FROM = { cancel_job_action = action_inquisition } Jobs
cancel_objective X character objective Outdated, now cancel_objective/cancel_plot Plots
cancel_plot character plot cancel_plot = plot_gain_title Plots
cancel_pregnancy character bool Ends a character's pregnancy instantaneously. Can be called at any time during pregnancy prior to birth. If pregnancy notification is to be avoided, must be called earlier than 2 months pregnancy. cancel_pregnancy = yes Characters
capital character province Moves the capital
ROOT = {
	b_korrala = {
		usurp_title = PREV
	}
}
b_korrala = {
	ROOT = { capital = PREV }
}

(Seizes the Barony of Korrala, followed by making it the subject's capital.)

Rulers
change_diplomacy character int Changes base diplomacy stat. Negative decreases base diplomacy but will not decrease base diplomacy below 0 change_diplomacy = 1 Characters
change_infamy X character clause Add or remove threat from a character.

value : numerical change in infamy/threat (can be a decimal value)
localisation : key for the localisation entry for the character's threat tooltip.

change_infamy = {
    value = x
    localisation = key
}
change_intrigue character int Changes base intrigue stat. Negative decreases base intrigue but will not decrease base intrigue below 0 change_intrigue = 1 Characters
change_learning character int Changes base learning stat. Negative decreases base learning but will not decrease base learning below 0 change_learning = 1 Characters
change_martial character int Changes base martial stat. Negative decreases base martial but will not decrease base martial below 0 change_martial = 2 Characters
change_mercenary_composition X title clause Change the composition of a dynamic mercenary title. change_mercenary_composition = { from = <unit> type = <unit> change = <int> }
change_plot_power X character int Add the specified amount of plot power to the plot owned by the scoped characters. change_plot_power = 10 Plots
change_random_civ_tech X province int change_random_civ_tech = 2 Provinces
change_random_eco_tech X province int Provinces
change_random_mil_tech X province int Provinces
change_society_currency character int/clause Changes the currency of scope character in their society. Can optionally specify parameters for the society to change the currency of and to scale the currency changed by the society influence, reducing the amount of currency consumed (or given, but is intended for the former) by 70% when the society is at 100% influence, going linearly from 0% at 0%.
change_society_currency = 100
change_society_currency = {
	society = the_assassins
	value = -200
	scaled_by_influence = yes
}
Characters
change_stewardship character int Changes base stewardship stat. Negative decreases base stewardship but will not decrease base stewardship below 0 change_stewardship = 1 Characters
change_tech province clause Improves technology in the province (referenced in common/technology.txt) change_tech = { technology = TECH_NAVAL value = 1} Province
change_title_army_size title double Changes the army size of a mercenary/adventurer title.
primary_title = {
	change_title_army_size = 0.05 # Increase of percentage
}
Titles
change_variable character/province clause Increment (or decrement) a variable with specified value, or another variable change_variable = { which = "bob_saget" value = 1 }

change_variable = { which = "bob_saget" which = another_var }

Control
character_event character clause Fires an event to scoped character. See event modding.
Parameter Type Description
id int Required. Event ID to fire. May use a namespace.
days int Optional. Base number of days to wait before firing the event. May use years instead. If not specified, event occurs instantly.
random int Optional. Number of days to add randomly for the event occurrence date, closed-ended (days to days+random).
tooltip Key Optional localisation key to show as tooltip. If not specified, uses the DEFAULT_SENDEVENT_EVENTOPTION_TOOLTIP key ("Character receives an event").
character_event = { id = 66010 days = 17 tooltip = EVTTOOLTIP66010 } Control
chronicle character clause Parameters: entry, portrait, picture
chronicle = { 
  entry = CHRONICLE_FOUNDED_
  NEW_KINGDOM_OR_EMPIRE 
  portrait = [Root.GetID]
}
Rulers
clan_opinion title clause
clan_opinion = {
	who = event_target:liege_clan
	modifier = won_tributary_war
	years = 5
}
Opinion
clan_reverse_opinion title clause
clan_reverse_opinion = { 
	who = PREVPREVPREV
	modifier = opinion_built_temple
	years = 20
}
Opinion
clear_banish_reasons X character character Removes all opinion modifiers allowing the scoped character to banish the given character. Doesn't clear ongoing reasons like excommunication. clear_banish_reasons = FROM Control
clear_delayed_event character/province clause Removes specified event id with a delayed trigger on current scope. clear_delayed_event = { id = HL.6500 } Control
clear_education_trait character bool Removes all traits with the education = yes parameter. clear_education_trait = yes Traits
clear_event_target any var Deletes a previously saved variable clear_event_target = target_victim Control
clear_execute_reasons X character character Removes all opinion modifiers allowing the scoped character to execute the given character. Doesn't clear ongoing reasons like excommunication. clear_execute_reasons = FROM Control
clear_flags_with_prefix character/province

/title/artifact

flag (prefix) Clears all flags of the current scope that begin with the specified prefix clear_flags_with_prefix = temple_name_ Control
clear_focus character bool Removes the focus of a character. Also see set_focus. clear_focus = yes
clear_global_event_target X any var Deletes a previously saved global variable Control
clear_global_event_targets X any bool Deletes all previously saved global variables clear_global_event_targets = yes Control
clear_persistent_event_target province/character/title/
artifact/society/offmap
var Deletes a persistent event target previously saved in the currently scoped object. clear_persistent_event_target = london_owner Control
clear_prison_reasons character character Removes all opinion modifiers allowing the scoped character to imprison the given character. Doesn't clear ongoing reasons like excommunication. clear_prison_reasons = FROM Control
clear_secret_religion character bool Removes the scoped character's secret religion. clear_secret_religion = yes Religion
clear_revoke_reasons X character character Removes all opinion modifiers allowing the scoped character to revoke the given character's titles. Doesn't clear ongoing reasons like excommunication. clear_revoke_reasons = FROM Control
clear_revolt province bool clear_revolt = yes Provinces
clear_wealth character bool/character Sets wealth of character to 0. Can be used after transfer of money via wealth command. clear_wealth = yes Money
clr_artifact_flag artifact flag clr_artifact_flag = stolen Control
clr_bloodline_flag X bloodline flag Removes a script flag from the scoped bloodline Bloodlines
clr_character_flag character flag clr_character_flag = flag_promised_marriage Control
clr_discovered_society X character bool Resets the character's revealed society. clr_discovered_society = yes Societies
clr_dynasty_flag chararcter flag clr_dynasty_flag = strange_chest Control
clr_flag any with flags flag Clears the given flag from the current scope. Works for any scope that can store flags, unlike the more specific clr_scope_flag commands. Control
clr_global_flag any flag clr_global_flag = shepherds_crusade_active Control
clr_offmap_tmp_flag offmap string Wipes the specified flag from the scoped offmap power. clr_offmap_tmp_flag = china_force_open_in_progress Offmap
clr_province_flag province flag clr_province_flag = tournament_60_days_furusiyya Control
clr_quest character bool/clause Removes any quest with that name (and from that society, if the society name is present) belonging to the scoped character. Can optionally specify a failure parameter, considered a success otherwise. clr_quest = quest_monastic_order_penance

clr_quest = { id = quest_hermetics_find_text failure = yes }

Societies
clr_quest_target X character quest_id Clears the target of the specified quest belonging to the scoped character. Does not clear the quest itself. clr_quest_target = quest_the_assassins_protege Societies
clr_title_flag title flag Control
clr_wonder_flag wonder string Removes a script flag from the scoped wonder clr_wonder_flag = religious_wonder Wonders
clr_wonder_upgrade_flag X upgrade string Removes a script flag from the scoped upgrade clr_upgrade_flag = broken_upgrade Wonders
conquest_culture character/title

/province

culture/character

/title/province

conquest_culture = PREVPREV Culture
convert_to title(holding) type Converts holding to another holding type: CASTLE, CITY, TEMPLE, TRIBAL, NOMAD convert_to = CASTLE Holdings
convert_to_secret_religion X character bool/character Sets the scoped character's public religion to his/her secret religion, or to the target character's secret religion if a scope is used. convert_to_secret_religion = yes Religion
copy_artifact_history artifact artifact Copies the artifact history from the given artifact to the scoped artifact. new_artifact = { copy_artifact_history = event_target:target_artifact } Artifacts
copy_name X character/title? character/title? As set_name, but sets name of scope to that of the right side of copy_name = <scope> argument. ROOT = { copy_name = FROM } Traits
copy_random_personality_trait character character ROOT = { copy_random_personality_trait = PREV } Traits
copy_title_history title title Copies title history from title on the right to title on the left. e_spain = { copy_title_history = k_asturias } Titles
copy_title_laws title title Copies title laws from title on the right to title on the left. e_spain = { copy_title_laws = k_asturias } Government
create_bloodline character clause Scoped characters founds a new bloodline of the specified type
Parameter Type Description
type bloodline Obligatory. Defines the type of bloodline from which to inherit the bloodlines modifier
religion religion Optional. Associates the bloodline with a religion connecting it with the religion view
society society Optional. Associates the bloodline with a society connecting it with the society view
inheritance Optional. Overrides the base type's inheritance rules. Valid entries are all_descendants, matrilineal, patrilineal, or no_inheritance
allow_bastards bool Optional. Overrides the base type's bastard rules
create_bloodline = {
    type = lord_of_outremer
    inheritance = matrilineal
}
Bloodlines
create_character character/province clause Creates a random character with specified parameters.
Parameter Type Description
age int age = 0
name string
has_nickname nickname
attributes clause martial, intrigue, diplomacy, stewardship, learning
trait trait trait = bastard
health double
fertility double
random_traits bool If omitted, the default is 'no'.
female bool/random/int female = no
female = random
female = 40 #40% chance of being female
employer title If omitted, defaults to scoped character, or owner of scoped province.
religion religion religion = ROOT
culture culture/random culture = ROOT
dynasty ID/none/random/culture/actually_culture dynasty = none
actually_culture picks a random dynasty name from the culture if there's no unused static dynasty to use
dna string
flag flag Note: does not support dynamic flags.
genetic_father character genetic_father = ROOT, used for portraits, congenital trait inheritance, etc. (Note: the trait inheritance is broken, and has been since Old Gods).
genetic_mother character genetic_mother = PREV
race character race = PREV
historical bool If yes, character won't ever be pruned from the database.
immortal_age int Age at which a character become immortal, if relevant.
create_character = {
  random_traits = no
  name = "Hassan"
  dynasty = random
  religion = ROOT
  culture = persian
  female = no
  age = 40
  attributes = {
    martial = 6
    diplomacy = 8
    stewardship = 9
    intrigue = 12
    learning = 12
  }
  health = 6
  fertility = 0.8
  trait = elusive_shadow
  trait = patient
  trait = zealous
  trait = scholar
  trait = chaste
  trait = temperate
}
Characters
create_family_palace character bool Creates the patrician family palace create_family_palace = yes Holdings
create_feud title title Create a feud between two clans
clan_title = {
	FROM = {
		clan_title = {
			create_feud = PREVPREV
		}
	}
}
Clans
create_hospital X character/title province (ID or scope pointing to province) Creates a hospital in the specified province
create_hospital = 123
create_random_diplomat character/province clause creates a random character with diplomacy education create_random_diplomat = { ... } Characters
create_random_intriguer character/province clause creates a random character with intrigue education create_random_intriguer = { ... } Characters
create_random_priest character/province clause creates a random character with learning education create_random_priest = { ... } Characters
create_random_soldier character/province clause creates a random character with martial education create_random_soldier = { ... } Characters
create_random_steward character/province clause creates a random character with stewardship education create_random_steward = { ... } Characters
create_title title clause Creates a dynamic title with specified parameters. Landless dynamic titles require a landed home province to both hold prisoners and to act as a fallback if the title gets destroyed. This command should be run from the home province scope, otherwise the whole court will end up stuck in province 0 when the holder dies.
Parameter Type Description
tier tier
landless bool
temporary bool Destroyed automatically when at peace. The holder and the courtiers cannot marry or accept most other diplo-actions.
rebel bool
culture culture
name Key Localization key for the title name.
holder character
custom_created bool
base_title title
copy_title_laws bool
mercenary bool
adventurer bool Adventure titles work just as temporary titles but do not get destroyed automatically when the holder is in peace. Instead, they are destroyed whenever the holder gains another title or when the holder dies.
ruler Key Localization key for the ruler title.
ruler_female Key Localization key for the female ruler title.
foa Key
nomad bool
replace_captain_on_death bool Used for dynamic mercenary titles.
siphons_income_to_creator double Percentage of income given to creator for dynamic mercenary titles.
army_template composition Army composition for dynamic mercenary titles.
short_name bool
create_title = { 
  tier = DUKE 
  name = "SHEPHERDS_CRUSADE" 
  holder = THIS 
}
Titles
create_tradepost X character/title province (ID or scope pointing to province) Creates a trade post in the specified province (only works if the character meets requirements such as being under their trade post limit)
create_tradepost = 123
culture character/province

/title

culture/character

/province/title

Culture
culture_techpoints character int culture_techpoints = 50 Rulers
cure_illness character bool cure_illness = yes Health
cut_mercenary_creator_relation title bool Break free the dynamic mercenary title from its creator. cut_mercenary_creator_relation = yes
damage_unit X unit clause Creates casualties for an army (whole unit or a specific unit type) by either a fixed amount or percentage. They won't be displayed in a combat report.[3][4]. Using a negative number will heal units instead.
Parameter Type Description
amount float Either amount or percentage is required.
percentage float
type unit_type Optional. Base unit types (light_infantry, heavy_infantry, pikemen, light_cavalry, knights, archers, special_troops, galleys, light_troops, or heavy_troops).
damage_unit = {
  amount = 150
}
damage_unit = { 
  percentage = 0.15
}
Units
damage_unit_morale X unit float Removes morale for the army (or adds morale with negative values). Only takes absolute values. damage_unit_morale = 0.6 Units
de_jure_liege title character/title/0 Changes the de jure structure
any_direct_de_jure_vassal_title = { 
  de_jure_liege = e_roman_empire
}
Vassalage
death character clause Kills currently scoped character death = { death_reason = death_execution killer = ROOT } Health
decadence character int decadence = -50 Characters
decline_law character title Also see approve_law. decline_law = FROM Council
destroy_artifact character/artifact artifact/bool Destroy the scoped or specified artifact. If there is no name given, the scope must be an artifact, and the PREV scope must be the owner. If an artifact name is given, the scope should be the owner of the artifact. If they own more than one, only the first one will be destroyed. Cannot be used to destroy indestructible objects; see unsafe_destroy_artifact any_artifact = { destroy_artifact = yes }

destroy_artifact = prosthetic_hand_gold

Artifact
destroy_bloodline X bloodline bool Removed the scoped bloodline from the game destroy_bloodline = yes Bloodlines
destroy_fort X province province Destroy the fort in a province. destroy_fort = THIS Provinces
destroy_hospital X character(?) province Destroys the hospital in the specified province destroy_hospital = FROMFROM Provinces
destroy_in_extra_holding X province clause Destroy a building in a special holding (hospital, fort or trade post). destroy_in_extra_holding = { type = trade_post building = tr_port_1 } Provinces
destroy_landed_title title title/bool Destroys a landed title. It can later be re-created by the player or AI, at the difference of deactivating it via activate_title.

Note: Count-tier titles can currently not be destroyed, even if titular and not connected to a province.

k_asturias = { destroy_landed_title = THIS } Titles
destroy_random_building province/holding bool/building Destroys a random building. If a building is given as the value, then that building will never be picked for destruction (even if it is the only one left).
random_demesne_title = { 
  destroy_random_building = yes
}
Holdings
destroy_settlement title title Destroys scoped holding. Also see build_holding. destroy_settlement = THIS Holdings
destroy_tradepost character province destroy_tradepost = FROMFROM Provinces
destroy_wonder_upgrade wonder/upgrade string/bool Would destroy/remove the upgrade specified, or if used in an upgrade scope, remove currently scoped upgrade. destroy_upgrade = yes/no/<upgrade name> Wonders
diplomatic_immunity character bool diplomatic_immunity = yes Characters
disable_council_voting_on_issue title votingTopic Changes council laws. Also see enable_council_voting_on_issue. disable_council_voting_on_issue = grant_landed_title_interaction Council
disable_prepared_invasion character religion Disable dynamically the allow_viking_invasion characteristic of a religion. Also see enable_prepared_invasion. disable_prepared_invasion = norse_pagan Religion
disband_event_forces character earmark Disbands the levies previously created with the given earmark via spawn_unit = { earmark = xxx } disband_event_forces = prepared_invasion Wars
divide_variable X character/province clause Divide a variable with specified value, or with another variable divide_variable = { which = var value = 2 }

divide_variable = { which = var which = another_var }

Control
dynasty character id/character Sets the dynasty of scoped character. May need to been chained with recalc_succession command, if impacting succession. Use dynasty = father_bastard to generate a cadet dynasty, dynasty = mother_bastard to create a bastard dynasty, or dynasty = none to make the character Lowborn. Special values used in character creation ("random", "culture", and "actually_culture") do not work here. When setting character dynasty in an event it only works inside of an immediate = { } block. dynasty = FROM Family
economy_techpoints character int economy_techpoints = -50 Rulers
enable_council_voting_on_issue title votingTopic Changes council laws. Also see disable_council_voting_on_issue. enable_council_voting_on_issue = laws

enable_council_voting_on_issue = declare_war_interaction

Council
enable_prepared_invasion any religion Enables dynamically prepared invasions for that religion with allow_viking_invasion flag. Also see disable_prepared_invasion. enable_prepared_invasion = norse_pagan Wars
end_oath title title Ends a blood oath
clan_title = {
	end_oath = THIS
}
Clans
end_war war string Possible war ends: invalid, whitepeace, success, reverse_demand end_war = invalid Wars
embargo character character embargo = FROM Wars
excommunicate character bool excommunicate = no Religion
export_to_variable X character/title/province clause Used to create (or reset) a variable to a the value of a trigger. export_to_variable = { which = "myStewardship" value = stewardship }

export_to_variable = { which = "yourStewardship" value = stewardship who = FROM }

Control
faction character faction faction = faction_lower_crown_authority Factions
fertility character double fertility = 0.4 Characters
force_host character character Similar to move_character, but it bypasses the checks and forces the character to move. Should not be used lightly. force_host = ROOT Characters
gain_all_occupied_titles character character gain_all_occupied_titles = FROM Titles
gain_settlements_under_title character clause Note: Does not work with "any_" scopes. gain_settlements_under_title = { title = PREV enemy = ROOT } Titles
gain_title title character/title Similar to abdicate_to
random_demesne_title = { 
  gain_title = FROM 
}
Titles
gain_title_plus_barony_if_unlanded X title character Gives opinion bonus toward the title giver gain_title_plus_barony_if_unlanded = ROOT Titles
gender_succ title string cognatic, agnatic, true_cognatic, enatic_cognatic, or enatic gender_succ = cognatic Government
give_job_title character job give_job_title = job_chancellor Jobs
give_minor_title character minor_title give_minor_title = title_chief_qadi Characters
give_nickname character nickname gives the character a nickname give_nickname = nick_the_great Characters
grant_kingdom_w_adjudication title character
random_demesne_title = { 
  grant_kingdom_w_adjudication = FROM
}
Titles
grant_title character/title title/character/clause Also grants any vassal owning or below current title
random_claim = { 
  grant_title = FROM 
}

grant_title = { target = PREV type = invasion }

Titles
grant_title_no_opinion X character/title title/character No claim for the giver and no opinion bonus from the receiver. Titles
health character double health = -1 Health
hold_election X character true For merchant republics hold_election = yes Government
impregnate character character/0 Scope gets impregnated by the value. impregnate = ROOT Marriage
impregnate_cuckoo character character/bool impregnate_cuckoo = ROOT Marriage
imprison character character/bool Scoped character will be imprisoned by target, or imprisoned in the correct location if used with boolean yes, or released from the prison with boolean no. Identical to the `prisoner` command. imprison = ROOT Characters
inherit character character Scoped character will inherit titles of target character. random_courtier = { inherit = ROOT } Titles
join_attacker_wars character character ROOT = { join_attacker_wars = PREV } Wars
join_defender_wars character character Only joins one war. Cannot be used by (feudal?) vassals to join liege's war. FROM = { join_defender_wars = ROOT } Wars
join_faction X character clause Joins the faction led by the faction leader, if it exists. Also supports the optional argument
ignore_requirements = yes
.
ROOT = {
	join_faction = {
		faction = faction_claimant
		faction_leader = PREV
	}
}
Factions
join_society character society Joins the specified society. join_society = the_assassins Societies
leave_faction X character faction/all leave_faction = faction_succ_seniority Factions
leave_plot character character leave_plot = FROM Plots
leave_society character bool Makes the scoped character leave the society they are currently part of. leave_society = yes Societies
log any string Logs for debug purposes into game.log. Localisation commands can be used normally in the string. Can even be used within event triggers and other places that normally only accept conditionals, such as if limit. Only logs if the game is started with the "-scriptlog" parameter. log = "20: Adultery discovered between [Root.GetTitledName] and [This.GetTitledName]!" Control
log_scopes X any bool[?] Logs a list of all event targets set, and what each scope corresponds to into game.log. Only logs if the game is started with the "-scriptlog" parameter. Control
letter_event character clause Fires an event to scoped character. See event modding.
Parameter Type Description
id int Required. Event ID to fire. May use a namespace.
days int Optional. Base number of days to wait before firing the event. If not specified, event occurs instantly.
random int Optional. Number of days to add randomly for the event occurrence date, closed-ended (days to days+random).
tooltip Key Optional localisation key to show as tooltip. If not specified, uses the DEFAULT_SENDEVENT_EVENTOPTION_TOOLTIP key ("Character receives an event").
letter_event = { id = 88752 days = 4 tooltip = "EVTTOOLTIP88751" } Control
make_capital_holding holding bool Makes the holding the capital of the province. Also see revoke_capital_holding. make_capital_holding = yes Holdings
make_primary_spouse character bool scoped character will become primary spouse FROM = { make_primary_spouse = yes } Marriage
make_primary_title title bool k_leon = { make_primary_title = yes } Rulers
make_tributary character clause Whoever the command is scoped from becomes the suzerain, WHO becomes the tributary and tributary_type determines what kind of tributary they are. For example, on a targetted_decision, to make the target the tributary of the decision taker, use the first example in the Example column. To make the decision taker the tributary, and the target the suzerain, use the second example. (The suzerain is the boss, the tributary is the servant). If tributary_type is omitted, it defaults to "default" FROM = { make_tributary = { who = PREV percentage = 0.4 tributary_type = imperial} }

make_tributary = { who = FROM percentage = 0.4 tributary_type = default }

Vassalage
manpower character int Increase/decrease manpower manpower = 250 Clans
military_techpoints character int military_techpoints = -50 Rulers
modulo_variable X character/title/province clause Divides the variable by the specified value or variable, returning the remainder of the division. set_variable = { which = fnord value = 35 }

modulo_variable = { which = fnord value = 11 }

  1. fnord is now 2
Control
morale unit/siege double Changes the morale of the unit by the amount indicated morale = -0.2 Army
move_character character character scoped character will be moved to targeted characters court FROM = { move_character = ROOT } Characters
multiply_variable character/province clause Multiply variable with specified value, or variable. multiply_variable = { which = var value = 2 }

multiply_variable = { which = var which = another_var }

Control
narrative_event character clause Fires an event to scoped character. See event modding.
Parameter Type Description
id int Required. Event ID to fire. May use a namespace.
days int Optional. Base number of days to wait before firing the event. If not specified, event occurs instantly.
random int Optional. Number of days to add randomly for the event occurrence date, closed-ended (days to days+random).
tooltip Key Optional localisation key to show as tooltip. If not specified, uses the DEFAULT_SENDEVENT_EVENTOPTION_TOOLTIP key ("Character receives an event").
narrative_event = { id = 88007 days = 2 } Control
occupy_minors_of_occupied_settlements character character occupy_minors_of_occupied_settlements = FROM Characters
opinion character clause Adds an opinion modifier to the scoped character towards the target character. Duration can be given in months or years (but not "days"), or omitted to use the duration specified in the opinion modifier definition. origin_description can be used to customize localization that appears in tooltip. See also reverse_opinion. opinion = { modifier = dynastic_refused_claim who = ROOT years = 5 } Opinion
participation_scaled_decadence character double Wars
participation_scaled_piety character double participation_scaled_piety = 1000 Wars
participation_scaled_prestige character double participation_scaled_prestige = 500 Wars
piety character int piety = 10 Characters
plot_succeeds character bool Tells the plot system to end the plot and fire the effect block. Note that it doesn't cause a plot to succeed, it should be used when a plot has already succeeded (success condition block). plot_succeeds = yes Plots
population character int population = 120000 Clans
press_claim title character press_claim = ROOT Claims
prestige character/title int prestige = -20 Characters
province_capital title bool b_tivoli = { province_capital = yes } Provinces
prompt_name character/province/landed title/artifact/bloodline clause Lets the player rename the scoped entity.
Parameter Type Description
player character What player should get the prompt.
type Key What message type to use, as defined in messagetypes.txt.
portrait character(?) Optional. What portrait to show on the right. If not defined, the scoped character (if scope is a character) will be used.
name_list Key Optional. What name list to use. Can also use "religion" for religious names of the scoped character's religion, or "culture" for cultural names. If not specified, there will be no "randomize name" button (except for characters, that'll use the standard buttons for newborns).
prompt_name = {

player = ROOT type = BAPTISM name_list = religion # Optional. What name list to use. Can also use "religion" for religious names of the scoped character's religion, or "culture" }

province_event province clause Fires an event to scoped province. See event modding.
Parameter Type Description
id int Required. Event ID to fire. May use a namespace.
days int Optional. Base number of days to wait before firing the event. If not specified, event occurs instantly.
random int Optional. Number of days to add randomly for the event occurrence date, closed-ended (days to days+random).
tooltip Key Optional localisation key to show as tooltip.
province_event = { id = 8512 days = 1 } Control
random any clause random = { chance = 5 add_trait = wounded } Control
random_list any clause random_list = { 50 = { ... } 50 = { ... } } Control
rebel_defection title bool rebel_defection = yes Provinces
recalc_succession any bool Recalculates the succession. recalc_succession = yes Government
reduce_disease province double random_demesne_province = { reduce_disease = 0.33 } Health
refill_holding_levy title bool
any_demesne_title = {
  limit = { tier = BARON }
  refill_holding_levy = yes
}
Holdings
religion character/title

/province

religion/clause Changes the (public) religion of scoped character/province/title. Can use a clause to specify which of the scope's religion to use, defaulting to public. See also unsafe_religion. religion = catholic

religion = { target_type = true target = ROOT }

Religion
religion_authority character/province double/clause Adds a religion modifier to the religion of scoped character/province religion_authority = { modifier = ruler_converted_from } Religion
remove_bloodline_member X bloodline character Remove the specified character from the scoped bloodline Bloodlines
remove_building X title building Holdings
remove_character_modifier character modifier Removes a character modifier remove_character_modifier = promised_a_title Modifiers
remove_character_modifiers X character clause Removes a number of instances of a character modifier (usually a stackable one). remove_character_modifiers = { modifier = promised_a_title amount = 2 } Modifiers
remove_claim character/title title/character Note: assigned value cannot be a scope reference to a title.[1] remove_claim = k_papal_state # Needs to be a title ID, won't work with a title scope reference (ROOT/FROM/PREV)

any_claim = { remove_claim = PREV } # PREV is a character

Claims
remove_consort character character Removes the consort/concubine relationship between the scoped and the given characters. Works in either scope. consort = { remove_consort = ROOT } Marriage
remove_evil_god_names religion bool Removes all evil god names from the scoped religion remove_evil_god_names = yes Religion
remove_favor X character character Target character no longer owes a favor to the scoped character. Also see reverse_remove_favor.
remove_friend character character remove_friend = FROM Relations
remove_from_bloodline X character bloodline Remove the scoped character from the specified bloodline. Note that the right-hand side must be a bloodlin, not a bloodline type. Bloodlines
remove_guardian character character remove_guardian = FROM Relations
remove_god_names religion bool Removes all god names from the scoped religion remove_god_names = yes Religion
remove_holding_modifier title modifier Removes a holding modifier remove_holding_modifier = recently_conquered Modifiers
remove_holding_modifiers X title clause Removes a number of instances of a holding modifier (usually a stackable one). remove_holding_modifiers= { modifier = recently_conquered amount = 2 } Modifiers
remove_holy_site X title religion Removes the scoped title from being a holy site of the given religion. Warning: this lets you have less than 5 holy sites which might cause weirdness. Also, removing holy sites to a religion but not its heresies will cause their icons to show up individually on other shared holy sites instead of being hidden like normal. c_kent = { remove_holy_site = catholic } Religion
remove_holy_site_with_heresies X title religion Removes the scoped title from being a holy site of the given religion and its heresies. Warning: this lets you have less than 5 holy sites which might cause weirdness. c_kent = { remove_holy_site_with_heresies = catholic } Religion
remove_lover character character Remove scoped character's lover remove_lover = yes Relations
remove_nickname character bool/nickname Remove character's nickname remove_nickname = yes Characters
remove_opinion character clause Removes an opinion modifier remove_opinion = { who = FROM modifier = opinion_friend } Opinion
remove_province_modifier province modifier Removes a province modifier remove_province_modifier = thieves_guild Modifiers
remove_province_modifiers X province clause Removes a number of instances of a province modifier (usually a stackable one). remove_province_modifiers = { modifier = thieves_guild amount = 2 } Modifiers
remove_rival character character Relations
remove_special_character_title X character key Characters
remove_spouse character string/bool/character remove scoped character's spouse remove_spouse = spouse Marriage
remove_title character job/minor_title remove_title = job_chancellor Jobs
remove_trait character trait Removes a trait, also see add_trait. remove_trait = charitable Traits
remove_tributary character character Stop a character to be tributary to its suzerain.
suzerain = {
	remove_tributary = PREV
}
Vassalage
remove_wonder_upgrade_slots X wonder/upgrade int Decreases the number of available upgrade slots remove_upgrade_slots = 1 Wonders
repeat_event any clause Fires an event, without modifying the event chain (i.e ROOT and FROM remain unchanged). Note that it will fire the event whose id is specified, and not necessarily the current event again. See event modding.

Warning: the event will fire for the character/province scope where it is written in, however the scopes of event chain will be weird if you do so (ROOT and default will be different, and FROM will be modified), so this is not recommended.

Parameter Type Description
id int Required. Event ID to fire. May use a namespace.
days int Optional. Base number of days to wait before firing the event. If not specified (or 0), event occurs instantly.
random int Optional. Number of days to add randomly for the event occurrence date, closed-ended (days to days+random).
tooltip Key Optional localisation key to show as tooltip. If not specified, uses the DEFAULT_SENDEVENT_EVENTOPTION_TOOLTIP key ("Character receives an event").
repeat_event = { id = WoL.5002 days = 30 } Control
reset_coa title title
k_hungary = {
  reset_coa = THIS
}
Titles
reveal_plot character bool/character reveal scoped characters plot. The plot discoverer may be specified. reveal_plot = yes

reveal_plot = ROOT #ROOT is the discoverer of the plot

Plots
reveal_plot_w_message character bool reveal scoped characters plot reveal_plot_w_message = yes Plots
reverse_add_favor character character Makes scoped character owe a favor to another character. Also see add_favor. reverse_add_favor = ROOT
reverse_banish character character random_realm_lord = { reverse_banish = FROM } Characters
reverse_culture character/province character/title/province Change the target's culture to the one of current scope reverse_culture = PREV Culture
reverse_imprison character character Target character will be imprisoned by the scoped character FROM = { reverse_imprison = ROOT } Characters
reverse_opinion character clause Adds an opinion modifier to the target character towards scoped character. reverse_opinion = { modifier = opinion_dislike who = FROM years = 5 } Opinion
reverse_religion character/province character/title

/province

reverse_religion = PREV Religion
reverse_remove_favor character character Scoped character no longer owes a favor to the target character. Also see remove_favor. reverse_remove_favor = event_target:pardon_target
reverse_remove_opinion character clause Removes an opinion modifier of right side of who argument towards scoped character. reverse_remove_opinion = { who = ROOT modifier = opinion_friend } Opinion
reverse_unsafe_war character clause Works like the reverse_war command, but without ensuring the CB can be used.
reverse_unsafe_war = {
	target = event_target:claimant
	casus_belli = other_claim
	thirdparty = ROOT
}
Wars
reverse_war character/title clause Initiate a war, with current character as defender. infamy can be used to override the threat value (for instance infamy = 0).
random_claim = { 
  reverse_war = { 
    target = from 
    casus_belli = other_claim 
    thirdparty = root 
  } 
}
Wars
revoke_capital_holding holding bool Also see make_capital_holding revoke_capital_holding = yes Holdings
revoke_law title law revoke_law = investiture_law_1 Government
save_event_target_as any var Saves a scope into a variable, to be re-used later in an event chain
father_of_unborn = {
  save_event_target_as = target_adulterer
}
Control
save_global_event_target_as X any var Saves a scope into a global variable, to be re-used later Control
save_persistent_event_target province/character/title/
artifact/society/offmap
clause Saves a scope into a persistent event target in the current scope to be reused later. name is the name of the event target, scope is the scope to save. Relative scoping works. This example saves the owner of the county of London in it:
c_london = {
  save_persistent_event_target = {
    name = london_owner
    scope = owner
  }
}
Control
scaled_piety X character double/clause Modifies piety by percent (1.0 = 100%) of annual piety increase. min increases final cost to min if result would be lower. max reduces the final cost to max if result would be lower. scaled_piety = -0.15

scaled_piety = { value = 0.5 min = 10 }

Characters
scaled_prestige character double/clause Modifies prestige by percent (1.0 = 100%) of annual prestige increase. min increases final cost to min if result would be lower. max reduces the final cost to max if result would be lower. scaled_prestige = -0.15

scaled_prestige = { value = 0.5 min = 10 }

Characters
scaled_wealth character double/clause Modifies wealth by percent (1.0 = 100%) of annual income. min increases final cost to min if result would be lower. max reduces the final cost to max if result would be higher. scaled_wealth = -0.15

scaled_wealth = { value = 0.5 min = 10 }

Money
seize_trade_post title/province character any_neighbor_province = { seize_trade_post = ROOT } Rulers
send_assassin character character send_assassin = FROMFROM Plots
set_allow_free_duchy_revokation title bool Crown laws set_allow_free_duchy_revokation = yes Government
set_allow_free_infidel_revokation title bool Crown laws set_allow_free_infidel_revokation = yes Government
set_allow_free_revokation title bool Crown laws set_allow_free_revokation = yes Government
set_allow_title_revokation title bool Crown laws Government
set_allow_feminism title bool set_allow_feminism = yes Government
set_allow_free_vice_royalty_revokation title bool Crown laws Government
set_allow_gender_laws title bool set_allow_gender_laws = yes Government
set_allow_vice_royalties title bool/tier Crown laws
set_allow_vice_royalties = duke
set_allow_vice_royalties = no
Government
set_allows_matrilineal_marriage title bool set_allows_matrilineal_marriage = yes Government
set_appoint_generals title bool Crown laws Government
set_appoint_regents title bool Crown laws Government
set_artifact_flag artifact flag set_artifact_flag = stolen Control
set_artifact_original_owner X artifact character Sets the original owner of the artifact set_artifact_original_owner = ROOT Artifact
set_can_toggle_looting unit bool Units
set_bloodline_flag X bloodline flag Adds a script flag to the scoped bloodline Bloodlines
set_character_flag character flag set_character_flag = decadence_drunkard Control
set_coa title title Set the coats of arms (flag) of a title to that of another title. An otherwise unused "dummy" title in landed_titles can be used to define the coats of arms.
primary_title = {
  e_hre = {
    set_coa = e_byzantium
  }
}
Titles
set_defacto_liege character/title character/title Sets the liege of a character. Can be used to make a character become independent via set_defacto_liege = THIS set_defacto_liege = FROM Vassalage
set_defacto_vassal character character/title holder_scope = { set_defacto_vassal = PREVPREV } Vassalage
set_description artifact/bloodline

/wonder/upgrade

string Changes the description of the scoped to artifact or bloodline to the given string/localisation key. All custom localisation is resolved when set, so the description will not change once set. Can be reset by setting it to the blank string "". set_description = how_to_carry_a_bow_desc Artifacts/Bloodlines
set_discovered_society X character bool/society Sets the character to be "revealed" to be part of the specified society, or otherwise their secret society if no society is specified. set_discovered_society = yes

set_discovered_society = the_assassins

Societies
set_dynasty_flag character flag set_dynasty_flag = the_victims Control
set_father character character/0 Change (or remove) the father of a character. set_father = PREV

set_father = 0

Family
set_flag any with flags flag Sets a flag in the current scope if it can store flags. Works for any such scope, unlike the more specific set_scope_flag commands. Control
set_flank_tactic X battle/unit? tactic? Totally ignores the triggers or phases. If the tactic has a phase change part then that part will be acknowledged however.[5] Units
set_focus character clause Sets the focus of a character (bypasses 5 year cooldown period) set_focus = focus_war Character
set_gender X character male/female/opposite Xets the scoped character's gender to be male or female or the opposite of what they currently are. Warning: messing with a character's gender may have unintended side effects so use with caution. set_gender = opposite Characters
set_global_flag any flag Creates a global flag. set_global_flag = west_francia_renamed Control
set_government_type character government Change the government type of a character set_government_type = feudal_government Government
set_graphical_culture X character culture/character

/province

Sets the ethnicity of character, based on the default graphical_culture of a culture, or of the culture of another character or province.

Note: it changes the face of the character, but not the clothing.

set_graphical_culture = norse (Note: will actually set norsegfx) Characters
set_guardian character character set_guardian = ROOT Guardianship
set_holy_site X title religion Sets the scoped title to be a holy site of the given religion. Warning: this lets you have more than 5 holy sites which might cause weirdness. Also, adding holy sites to a religion but not its heresies will cause their icons to show up individually on other shared holy sites instead of being hidden like normal. c_london = { set_holy_site = catholic } Religion
set_holy_site_with_heresies X title religion Sets the scoped title to be a holy site of the given religion and its heresies. Warning: this lets you have more than 5 holy sites which might cause weirdness. c_london = { set_holy_site_with_heresies = catholic } Religion
set_high_god_name religion key Sets the religion's high god's name to the given key. set_high_god_name = GOD_QUETZALCOATL Religion
set_immune_to_pruning X character bool Sets a character as important. They will neither be removed from AI courts nor be deleted from the saved game to reduce file size. WARNING: This cannot be reversed. set_immune_to_pruning = yes Characters
set_interested_society character society Make a character interested in joining the specified society. set_interested_society = the_assassins Societies
set_investiture title string Crown laws set_investiture = head / set_investiture = any Government
set_job_action character clause Update the current job of a councillor.
job_spiritual = {
	set_job_action = {
		action = action_inquisition
		where = event_target:event_ze_5000_province
	}
}
set_looting unit bool Used with set_can_toggle_looting set_looting = yes Units
set_men_can_take_consorts religion bool Sets the religion's men_can_take_consorts attribute to the given value. norse_pagan = { set_men_can_take_consorts = no } Religion
set_mercenary_maintenance_modifier title modifier set_mercenary_maintenance_modifier = maintaining_mercenary_band_2
set_mother character character set_mother = PREV Family
set_name character/title

/province/artifact /bloodline/wonder/upgrade

string Override name of character or title. Using set_name = "" resets the original name. You can also use a scope of the same type as the thing being renamed. b_kolbatz = { set_name = Jomsborg }
c_100 = { set_name = c_101 }
Control
set_offmap_currency character clause Sets the scoped character's total amount of offmap currency for the specified offmap power to the value. set_offmap_currency = { offmap = offmap_china value = 250 } Offmap
set_offmap_dislike X ? clause Sets the dislike of the specified offmap power to the specified type. May use "random" to switch to a random dislike. set_offmap_dislike = { offmap = offmap_china type = random } Offmap
set_offmap_holder offmap character Sets the scoped offmap power's current ruler to the target scope. set_offmap_holder = event_target:invasion_of_china_claimant Offmap
set_offmap_like X ? clause Sets the like of the specified offmap power to the specified type. May use "random" to switch to a random like. set_offmap_like = { offmap = offmap_china type = likes_arabs } Offmap
set_offmap_name offmap string Sets the scoped offmap power's name to the localisation key corresponding to the string. set_offmap_name = "tang_china" Offmap
set_offmap_tmp_flag offmap string Adds the specified script flag to the scoped offmap power (check with has_offmap_tmp_flag or has_offmap_flag). set_offmap_tmp_flag = WP_is_not_on_map Offmap
set_opinion_levy_raised_days character clause set_opinion_levy_raised_days = { who = ROOT days = 0 } Opinion
set_original_owner artifact character Changes the original owner of an artifact. set_original_owner = FROM Artifact
set_parent_religion any clause Religion becomes an heresy of new parent religion set_parent_religion = { religion = catholic parent = orthodox } Religion
set_pentarch_title X title title/none The scoped title becomes under the authority of the specified Pentarch seat
k_aragon = { set_pentarch_title = b_jerusalem }
Religion
set_player_character character character The player controlling the scoped character starts controlling the given character instead. Does not enforce remaining within the same dynasty. WARNING: It's possible to cause game overs with this so use with care.
set_player_character = event_target:new_crusader_king
Control
set_policy offmap id Sets the scoped offmap power's current policy to the specified ID (corresponding to a policy in /common/offmap_powers/policies). set_policy = china_open Offmap
set_preferred_capital X title province Sets the preferred capital of the scoped title to the specified provinces. Works for both dynamic and static titles since patch 2.8. set_preferred_capital = 35 Government
set_protected_inheritance title bool Crown laws: avoid titles leaving the realm upon inheritance set_protected_inheritance = yes Government
set_province_flag province flag set_province_flag = home_of_jeanne_darc Control
set_quest character quest_id/clause Creates a quest for the scoped character. Society can be optionally specified. set_quest = monastic_orders_temple_construction Societies
set_quest_target character/title/province clause Creates a quest targeting the current scope or changes the target of an already exist target to the scope.
Parameter Type Description
id quest_id The name of the quest. Dynamic and can be anything (though requires localisation).
holder character The character who receives the quest, or who has it already.
society society Optional, defaults to the character's society. If the society is not set, and the character is not part of a society, this will send an error and nothing will happen.
set_quest_target = {
	id = quest_the_assassins_protege
	holder = FROM
	society = the_assassins
}
Societies
set_real_father character character When a child is denounced (no official father), real_father is used to keep track of it. set_real_father = FROM Family
set_reincarnation character character/0 father_even_if_dead = { ROOT = { set_reincarnation = THIS } } Family
set_rel_head_defense X religion bool Sets the religion's rel_head_defense attribute to the given value. catholic = { set_rel_head_defense = no } Religion
set_secret_religion character religion/clause Sets the secret religion of the character to the right-hand-side (defaulting to secret religion, if applicable). Can be expanded to specify what visibility to use. set_secret_religion = taoist

set_secret_religion = { target_type = public target = FROM }

Religion
set_short_name title bool Sets the title's short_name parameter to the given value. set_short_name = yes Titles
set_society_grandmaster character bool Set or unset the scoped character as the grandmaster of their society. set_society_grandmaster = yes Societies
set_society_progress society float Set the society's current progress to a given value. set_society_progress = 0 Societies
set_special_character_title character key set_special_character_title = GENGHIS_KHAN Characters
set_status offmap id Sets the scoped offmap power's current status modifier to the specified ID (corresponding to a modifier in /common/offmap_powers/statuses). set_status = china_stable Offmap
set_the_kings_full_peace title bool Crown laws: allow/disallow vassals to wage war set_the_kings_full_peace = yes Government
set_the_kings_peace title bool Crown laws: allow/disallow vassals to wage war between them set_the_kings_peace = no Government
set_title_flag title flag Creates a flag on a title set_title_flag = temporary_landless_title Control
set_title_adventurer title clause set/unset title as being an adventurer title. set_title_adventurer = { title = THIS status = yes } Titles
set_title_landless title clause set/unset title as being a temporary title. set_title_landless = { title = THIS status = yes } Titles
set_title_nomad title clause set/unset title as being a nomad title. set_title_nomad = { title = THIS status = no } Titles
set_trade_route_base_value X holding title? double? Holdings
set_trade_route_value_multiplier X holding title? double? Holdings
set_tribal_vassal_levy_control title bool Whether liege can directly raise tribal vassal levies set_tribal_vassal_levy_control = yes Laws
set_tribal_vassal_tax_income title bool Whether tribal vassals pay taxes to their liege set_tribal_vassal_tax_income = yes Laws
set_truce character bool Gives a temporary truce to the scoped character towards right side of who argument set_truce = { who = from years = 5 } Wars
set_variable character/province clause Used to create (or reset) a variable to a value, or to the value of another variable set_variable = { which = "bob_saget" value = 1 }

set_variable = { which = "bob_saget" which = "another_var" }

Control
set_women_can_take_consorts religion bool Sets the religion's women_can_take_consorts attribute to the given value. norse_pagan = { set_women_can_take_consorts = yes } Religion
set_wonder_flag wonder string Adds a script flag to the scoped wonder. set_wonder_flag = religious_wonder Wonders
set_wonder_upgrade_flag upgrade string Adds a script flag to the scoped upgrade. set_upgrade_flag = broken_upgrade Wonders
society_rank_down X character int/clause Rank down a character by the specified number of ranks in their current society, or the society specified if applicable. society_rank_down = 1

society_rank_down = { society = the_assassins rank = 1 }

Societies
society_rank_up character int/clause Rank up a character by the specified number of ranks in their current society, or the society specified if applicable. society_rank_up = 1

society_rank_up = { society = the_assassins rank = 1 }

Societies
sound_effect any sound Plays the specified sound, as defined in interface/sound.sfx sound_effect = devil_worshippers_desecrate_temple Sounds
spawn_disease province disease Spawns a specific disease in the scoped province spawn_disease = typhoid_fever Health
spawn_fleet character clause
Parameter Type Description
province province/closest Closest sea zone
owner character
earmark earmark ID of the unit, to be able to reference them later.
troops clause Fixed amount of troops in the form troop_type = { <max_value> <starting_value> }. Ex: galleys = { 20 20 }
match_character character
match_mult double Matches against the total levies of every single holding
match_min double
disband_on_peace bool
cannot_inherit bool
spawn_fleet = {
  province = closest
  owner = ROOT
  disband_on_peace = yes
  earmark = conscripted_merchant_ships
  troops = {
    galleys = { 20 20 }
  }
}
Wars
spawn_unit character clause
Parameter Type Description
province province/closest/closest_to_capital Spawn location
home province
owner character
leader character/none Defaults to current character scope.
earmark earmark ID of the unit, to be able to reference them later. Can be localized via earmark_ARMY and earmark_ARMY_OF.
troops clause Fixed amount of troops in the form troop_type = { <max_value> <starting_value> }. Ex: archers = { 100 100 }
match_character character Character to match against for match_mult
match_mult double Proportional amount of troops to match_character total levy size (levies and event troops)
match_max double
match_min double
disband_on_peace bool Will auto-disband if at peace.
cannot_inherit bool Marked as not inheritable
attrition double Attrition multiplier (1.0 for normal, 0 for attrition-less)
maintenance_multiplier double Will have normal maintenance cost multiplied by this value
scaled_by_biggest_garrison double
merge bool Merge all the regiments in this province together into one army
can_toggle_looting bool
is_looter bool
reinforces bool By default spawned unit do not reinforce.
reinforce_rate_multiplier double
maintenance bool
spawn_unit = {
  owner = ROOT
  province = ROOT
  home = ROOT
  troops = {
    archers = { 500 500 }
    light_infantry = { 1500 1500 }
    heavy_infantry = { 300 300 }
    light_cavalry = { 200 200 }
  }
  attrition = 1.0
  disband_on_peace = yes
  maintenance_multiplier = 0.5
}
Wars
start_faction X character clause Starts a faction on the liege of the current character scope, if it does not already exist. Different arguments are required depending on the type of the faction being started:
  • character: faction
  • liege_titles: faction, title
  • liege_titles_w_claimant: faction, title, thirdparty

The optional can_join_existing argument controls whether or not the character will join the faction if it already exists, with the default behaviour being no.

start_faction = {
    faction = faction_succ_seniority
    title = event_target:liege_primary_title
    can_join_existing = yes
}
Factions
start_outbreak X any disease Forces an outbreak, but follows the scenarios set up in the disease.txt file. Health
start_society_progress society bool Enables the society's progress bar. start_society_progress = yes Societies
stop_society_progress society bool Disables the society's progress bar. stop_society_progress = yes Societies
steal_population_scaled character clause Steal population from another nomad clan
steal_population_scaled = {
	target = FROM
	percentage = 0.1
}
Jobs
steal_random_tech X province character steal_random_tech = character Jobs
subjugate_or_take_under_title character clause subjugate_or_take_under_title = { title = PREV enemy = FROM } Wars
subtract_variable X character/province clause Subtract specified value or another variable to a variable subtract_variable = { which = var value = 1 }

subtract_variable = { which = var which = another_var }

Control
succession title succession/clause Either a hard-coded succession type: gavelkind, primogeniture, feudal_elective, seniority, catholic_bishopric, open_elective, turkish_succession, patrician_elective, ultimogeniture, tanistry, appointment, papal_succession, elective_gavelkind

Or a clause consisting of an elective base_type (feudal_elective, elective_gavelkind, or tanistry) and voting_rules token (defined in common/succession_voting/)

The latter can also be set separately using the elective_voting_rules command.

succession = primogeniture
succession = {
    base_type = feudal_elective
    voting_rules = byzantine_elective
}
Government
succession_w_cooldown title succession/clause succession_w_cooldown = primogeniture Government
transfer_artifact artifact clause Transfers the artifact from one character to another. If from does not have the artifact, it will not be transferred. transfer_artifact = {

from = PREV to = PREVPREV }

Artifact
transfer_scaled_wealth character clause
Parameter Type Description
from character Either from or to
to character Either from or to
value all/double 1 means 1 year of income
min double min = 5
max double max = 50
transfer_scaled_wealth = { to = FROM value = 0.25 } Money
treasury character int Same as wealth ? treasury = -20 Money
trigger_switch any clause
trigger_switch = {
	on_trigger = religion_group
	christian = { ... }
	muslim = { ... }
	jewish_group = { ... }
	fallback = { ... } #if does not match any of the above
}
Control
troops unit/siege double Changes the size of the unit by the amount indicated troops = -0.2 Army
unsafe_destroy_artifact artifact/character bool/artifact Destroys the artifact, even if indestructible.
hidden_effect = {
	unsafe_destroy_artifact = yes
}
unsafe_destroy_artifact = cursed_diamond
Artifacts
unsafe_destroy_landed_title any title Bypasses some error-checking in destroy title, allowing to destroy landless titles. Warning: use this effect with care !
d_iconoclast = { 
  unsafe_destroy_landed_title = THIS
}
Titles
unsafe_destroy_landed_title any title Bypasses some error-checking in destroy title, allowing to destroy landless titles. Warning: use this effect with care !
d_iconoclast = { 
  unsafe_destroy_landed_title = THIS
}
Titles
unsafe_impregnate character character/0 Scope gets impregnated by the value. This will work even on someone already pregnant. unsafe_impregnate = ROOT Marriage
unsafe_impregnate_cuckoo X character character/0 unsafe_impregnate_cuckoo = ROOT Marriage
unsafe_religion character/title religion Bypasses some error-checking in set religion, allowing to change the religion of the leader of a holy order, a religious head or a rebel leader. Warning: use this effect with care !
d_iconoclast = {
  holder_scope = {
    unsafe_religion = orthodox  
  }
}
Religion
unsafe_war character clause Works like the war command, but without ensuring the CB can be used.
unsafe_war = {
	target = PREVPREV
	casus_belli = duchy_adventure
	thirdparty_title = PREV
	tier = DUKE
}
Wars
usurp_title character/title title/character/clause c_pest = { usurp_title = ROOT }

usurp_title = { target = ROOT type = invasion }

Titles
usurp_title_only title character/clause Gives strong claim to character being usurped usurp_title_only = ROOT

usurp_title_only = { target = PREV type = holy_war }

Titles
usurp_title_plus_barony_if_unlanded character/title title/character/clause Gives strong claim to character being usurped.

Note: Command shortened in example to avoid stretching the column.

plot_target_title = { 
  <command> = PREV
}
Titles
usurp_title_plus_barony_if_unlanded

_and_vassals

character/title/clause title/character Targeted character will usurp scoped title

Note: Command shortened in example to avoid stretching the column.

c_byzantion = { 
  <command> = PREV
}
Titles
usurp_title_plus_barony_if_unlanded

_and_vassals_no_adj

character/title title/character/clause Targeted character will usurp scoped title

Note: Command shortened in example to avoid stretching the column.

<command> = {
  target = ROOT 
  type = claim
}
Titles
vassalize_or_take_under_title character clause Note: Command shortened in example to avoid stretching the column. <command> = { title = PREV enemy = FROM } Vassalage
vassalize_or_take_under_title

_destroy_duchies

character clause Note: Command shortened in example to avoid stretching the column. <command> = { title = PREV enemy = FROM } Vassalage
war character clause Initiate a war, with current character as attacker. Also see reverse_war. infamy can be used to override the threat value (for instance infamy = 0). war = { target = PREVPREV casus_belli = duchy_adventure thirdparty_title = PREV tier = DUKE } Wars
wealth character double/character Modify the wealth of scoped character with the specified amount, or with the wealth of another character. wealth = -50 Money

See also[edit]

References[edit]