雜項
名稱 | 描述 | 示範 | 注釋 | 添加版本 |
---|---|---|---|---|
on_startup | 在新遊戲的第一天觸發(不包括保存與加載) | on_startup = { effect = { ... } }
|
1.0 | |
on_daily | 每一天對每個國家觸發(對性能要求高,要謹慎使用呀~) | on_daily = { effect = { ... } }
|
對於給mod添加新機制很有用(比如說可以每天新增一個變量) | 1.5.2 |
on_weekly | 每周對每個國家觸發 | on_weekly = { effect = { ... } }
|
對於寫ai的腳本很有用 | 1.9 |
on_weekly_TAG | 每周對指定(TAG)的國家觸發 | on_weekly_TAG = { effect = { ... } }
|
1.9 | |
on_monthly | 每月對每個國家觸發 | on_monthly = { effect = { ... } }
|
1.9 | |
on_monthly_TAG | 每周對指定(TAG)的國家觸發 | on_monthly_TAG = { effect = { ... } }
|
1.9 | |
on_nuke_drop | 當有國家丟核彈時觸發命令 | on_nuke_drop = {effect = { set_global_flag = first_nuke_dropped } }
|
目標國(FROM)是被炸的省份 | 1.0 |
on_pride_of_the_fleet_sunk | 當有國家的艦隊榮耀被擊沉時觸發命令 | on_pride_of_the_fleet_sunk = { effect = { ... } }
|
目標國(FROM)是擊沉它的國家, 本國(ROOT) 是被擊沉的國家 | 1.6 |
on_naval_invasion | 當進行登陸作戰時觸發命令 | on_naval_invasion = { effect = { ... } }
|
該省是被登陸的省份,本國( ROOT)是進行登陸的國家。目標(FROM)省份是該登陸行動開始的省份 | 1.9 |
on_paradrop | 當傘兵空降時觸發命令 | on_paradrop = { effect = { ... } }
|
該(THIS)省是被空降的省份,本國( ROOT)是執行空降的國家。目標(FROM)省份是該空降行動開始的省份 | 1.9 |
政治
名稱 | 描述 | 示範 | 注釋 | 添加版本 |
---|---|---|---|---|
on_coup_succeeded | 政變成功時觸發命令 | on_coup_succeeded = { effect = { random_other_country = { limit = { has_government = democratic original_tag = ROOT } set_politics = { elections_allowed = yes } } } }
|
1.0 | |
on_government_change | 當一個國家改變政府時觸發命令 | on_government_change = { effect = { ... } }
|
1.0 | |
on_ruling_party_change | 當一個國家改變意識形態時觸發命令 | on_ruling_party_change = { effect = { ... } }
|
1.9 | |
on_new_term_election | 當選舉開始或正在選舉時觸發命令 | on_new_term_election = { random_events = { 100 = usa.6 } }
|
1.0 | |
on_peaceconference_ended | 當和談結束時觸發命令 | on_peaceconference_ended = { effect = {...} }
|
本國(ROOT)是戰勝國, 目標國(FROM)是戰敗國 | 1.0 |
外交/戰爭
名稱 | 描述 | 示範 | 注釋 | 添加版本 |
---|---|---|---|---|
on_send_volunteers | 當一個國家向外國送志願軍時觸發命令 | on_send_volunteers = { effect = {...} }
|
本國(ROOT)是送志願軍的國家,目標國(FROM)是收志願軍的 | 1.9 |
on_border_war_lost | 當有國家打輸邊境戰爭時觸發命令 | on_border_war_lost = { effect = { owner = { country_event = { id = china.14 } } } }
|
1.0 | |
on_declare_war | 當有國家宣戰時觸發命令 | on_declare_war = { effect = { if = { limit = { ROOT = { tag = SOV } FROM = { has_idea = anti_soviet_pact } } } } }
|
目標(FROM)是戰爭目標 | 1.0 |
on_war | 當一個國家參加戰爭時觸發命令 | on_war = { effect = { = {...} }
|
#THIS is country that has just gotten into a war. | 1.9 |
on_capitulation | 當一個國家投降時觸發命令 | on_capitulation = { effect = {...} }
|
本國(ROOT)是停止抵抗國, 目標國(FROM)戰勝國. | 1.0 |
on_uncapitulation | 當一個投降的國家結束投降狀態時觸發命令 | on_uncapitulation = { effect = {...} }
|
本國(ROOT)是該國家 | 1.6 |
on_annex | 當一個國家被吞併時觸發命令 | on_annex = { effect = { = {...} }
|
本國(ROOT)是吞併者, 目標國(FROM)是被吞併者。如果是內戰結束那也會被觸發 | 1.0 |
on_civil_war_end_before_annexation | 在目標國(FROM)被吞併前就觸發命令那麼這個國家和它的一切將依然存在 | on_civil_war_end_before_annexation = { effect = { = {...} }
|
本國(ROOT)是吞併者,目標國( FROM) 是被吞併者. 這也會觸發 on_annex和
on_civil_war_end. |
1.6 |
on_civil_war_end | 內戰結束時觸發命令 | on_civil_war_end = { effect = { = {...} }
|
本國(ROOT) 是內戰勝利的一方, 目標國(FROM) 是被吞併的一方。這也會觸發on_annex. | 1.0 |
on_puppet | 只有當一個國家在和談上被傀儡時觸發命令 | on_puppet = { effect = { = {...} }
|
ROOT 是被傀儡國, FROM是宗主國 | 1.0 |
on_liberate | 只有當一個國家在和談上被解放時觸發命令 | on_liberate = { effect = { = {...} }
|
ROOT是被解放國, FROM 是解放它的國家 | 1.0 |
on_release_as_free | 釋放國家時執行命令 | on_release_as_free = { effect = { = {...} }
|
ROOT是被釋放的國家,FROM 是釋放者 | 1.0 |
on_release_as_puppet | 在和平時期通過佔領區菜單釋放傀儡或從佔領的非核心領土上釋放時觸發命令 | on_release_as_puppet = { effect = { = {...} }
|
ROOT是被釋放國, FROM是宗主國 | 1.0 |
on_war_relation_added | 當兩個國家彼此交戰時觸發(on_war一國與另一國交戰時被觸發,在與另外一個國家交戰時則不會再被觸發,除非先停戰了)
原文:fired when two countries end up at war with each other (on_war is fired when a country goes to war against anyone and is not fired again when it enters war against another country unless it went to peace first) |
on_war_relation_added = { effect = { = {...} }
|
ROOT 是進攻國, FROM 是防禦國 | 1.9.3 |
陣營
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_create_faction | 當一個國家創建一個陣營時觸發命令 | on_create_faction = { effect = {...} }
|
FROM是加入該陣營的國家 | 1.0 |
on_faction_formed | 當一個陣營形成時觸發命令 | on_faction_formed = { effect = { news_event = { id = news.159 } } }
|
1.0 | |
on_offer_join_faction | 當邀請一個國家加入陣營時觸發命令 | on_offer_join_faction = { effect = {...} }
|
FROM是被邀請的國家 | 1.0 |
on_join_faction | 當一個國家被邀請加入陣營時對該陣營領導國家觸發命令 | on_join_faction = { effect = {...} }
|
FROM 是陣營領導者 | 1.0 |
on_assume_faction_leadership | 當一個國家奪取陣營領導者時觸發命令 | on_assume_faction_leadership = { effect = {...} }
|
FROM是前陣營領導者 | 1.6 |
on_leave_faction | 當一個國家離開陣營時觸發命令 | on_leave_faction = { effect = { if = { limit = { AND = { tag = CAN NOT = { has_dlc = "Together for Victory" } } } drop_cosmetic_tag = yes } }
|
1.0 |
自治權
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_subject_annexed | 當一個國家吞併了它的一個傀儡時觸發命令 | on_subject_annexed = { effect = { ... } }
|
ROOT 是傀儡, FROM是宗主國 | 1.0 |
on_subject_free | 當一個國家的傀儡成為自由國家時觸發命令 | on_subject_free = { effect = { ... } }
|
ROOT是傀儡, FROM前宗主國. | 1.0 |
on_subject_autonomy_level_change | 當傀儡的自治等級改變時觸發命令 | on_subject_autonomy_level_change = { effect = { ... } }
|
ROOT 是傀儡, FROM是宗主國 | 1.0 |
流亡政府
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_government_exiled | 當一個國家進入流亡狀態時觸發命令 | on_government_exiled = { effect = { = {...} }
|
ROOT是該流亡國家, FROM是這個流亡政府所在的國家 | 1.6 |
on_host_changed_from_capitulation | 當流亡國家所在的國家投降時觸發命令 | on_host_changed_from_capitulation= { effect = { = {...} }
|
ROOT是該流亡國家。 FROM是流亡政府遷移到的新的國家。FROM:FROM 是該流亡政府之前所在的國家 | 1.6 |
on_exile_government_reinstated | 當一個流亡國家結束流亡時觸發命令 | on_exile_government_reinstated = { effect = { = {...} }
|
ROOT是該流亡國家, FROM 是該流亡政府曾經所在的國家 | 1.6 |
省份
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_state_control_changed | 當一個省份的控制者更改時觸發命令 | on_state_control_changed = { effect = { ... } }
|
ROOT是新控制者, FROM 舊控制者, FROM.FROM是省份(state)ID. | 1.0 |
戰爭目標
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_justifying_wargoal_pulse | 每當有國家對該國家正當化戰爭目標時觸發命令 | on_justifying_wargoal_pulse = { random_events = { 100 = war_justification.1 } }
|
FROM = 目標國家。每天都進行檢測 | 1.0 |
on_wargoal_expire | 當戰爭藉口過期時觸發命令 | on_wargoal_expire = { random_events = { 100 = war_justification.301 } }
|
FROM是戰爭藉口的所有國 | 1.0 |
領袖
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_unit_leader_created | 當招聘一個將領時觸發命令 | on_unit_leader_created= { effect = {...} }
|
FROM 是該國家 ROOT是該將領 | 1.5 |
on_army_leader_daily | 每天對一位將領觸發命令 | on_army_leader_daily = { effect = {...} }
|
FROM 是該國家 | 1.0 |
on_army_leader_won_combat | 當一名將領打贏一場戰鬥後觸發命令 | on_army_leader_won_combat = { effect = {...} }
|
FROM 是該國家 | 1.0 |
on_army_leader_lost_combat | 當一名將領打輸一場戰鬥後觸發命令 | on_army_leader_lost_combat = { effect = {...} }
|
FROM 是該國家 | 1.0 |
on_unit_leader_level_up | 當一名將領升級時觸發命令 | on_unit_leader_level_up = { effect = {...} }
|
1.0 | |
on_army_leader_promoted | 晉升將領時觸發命令 | on_army_leader_lost_combat = { effect = { add_timed_unit_leader_trait = { trait = recently_promoted days = 100 } } }
|
1.0 |
王牌飛行員
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_ace_promoted | 當產生王牌時觸發命令 | on_ace_promoted = { random_events = { 100 = ace_promoted.1 } }
|
FROM =王牌 | 1.0 |
on_ace_killed | 當王牌陣亡時觸發命令 | on_ace_killed = { random_events = { 100 = ace_died.1 } }
|
FROM =王牌 | 1.0 |
on_ace_killed_on_accident | 當王牌因事故而死時觸發命令 | on_ace_killed_on_accident = { random_events = { 100 = ace_died.1 } }
|
FROM = 我們的因事故而死 | 1.9 |
on_non_ace_killed_other_ace | 當王牌擊落敵軍王牌時觸發命令 | on_non_ace_killed_other_ace = { FROM = { random_events = { 100 = ace_died.1 } } }
|
FROM = 敵軍王牌 | 1.9 |
on_ace_killed_by_ace | 當王牌被敵軍王牌擊落時觸發命令 | on_ace_killed_by_ace = { random_events = { 100 = ace_killed_by_ace.1 } }
|
FROM = 我們的王牌, PREV = 擊落了 FROM 的敵軍王牌. | 1.0 |
on_ace_killed_other_ace | 當我們王牌擊落敵軍王牌時觸發命令 | on_ace_killed_other_ace = { random_events = { 100 = ace_killed_other_ace.1 } }
|
FROM = 我們的王牌, PREV = 被 FROM擊落的敵軍王牌. | 1.0 |
on_aces_killed_each_other | 當兩個王牌擊落了彼此時觸發命令 | on_aces_killed_each_other = { random_events = { 100 = aces_killed_each_other.1 } }
|
FROM = 王牌, PREV =敵軍王牌 | 1.0 |
抵抗運動
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_operation_completed | 當行動完成即觸發命令 | on_operation_completed = { effect = {...} }
|
THIS -這場行動, ROOT -行動發起國, FROM - 目標國家 | 1.9 |
on_operative_detected_during_operation | 當參與行動的人員死亡時觸發命令 | on_operative_death = { effect = {...} }
|
THIS -這場行動, ROOT - 阻止這場行動的國家(可選), FROM - 這場行動針對的國家, FROM.FROM - 行動省份 (在這場行動有特定目標時才能被設置). | 1.9 |
on_operative_on_mission_spotted | 當一個特工在一個國家執行任務時觸發命令 | on_operative_on_mission_spotted = { effect = {...} }
|
THIS - 這場行動, FROM -特工所在的國家 ROOT-行動所針對的國家 | 1.9 |
on_operative_captured | 特工被捕時觸發命令 | on_operative_captured = { effect = {...} }
|
THIS - the 這場行動, ROOT - 特工所在的國家, FROM - 行動所針對的國家 | 1.9 |
on_operative_death | Trigger the following commands whenever an operative dies. | on_operative_death = { effect = {...} }
|
THIS - the operative, ROOT - the killer country (optional), FROM - the country the operative is operating for. | 1.9 |
on_fully_decrypted_cipher | Trigger the following commands whenever a country fully decrypts cipher of a target country. | on_fully_decrypted_cipher = { effect = {...} }
|
THIS - the target country that its cipher is decrypted, FROM - the decrypter country. | 1.9 |
on_activated_active_decryption_bonuses | Trigger the following commands whenever a country activates its active cipher bonuses against a target. | on_activated_active_decryption_bonuses = { effect = {...} }
|
THIS - the target country, FROM - the country that activates its bonuses. | 1.9 |
模組製作
文檔 | 效果 • 條件 • 定義 • 修正 • 修正列表 • 作用域 • 本地化 • 行動 • Data structures (Flags, Event targets, Country tag aliases, Variables, Arrays) |
編寫腳本 | AI • AI focuses • Autonomous states • Balances of power • 劇本 • 建築 • Characters and traits • Cosmetic tags • 國家 • 師 • 決議 • 裝備 • 事件 • 內閣/民族精神 • 意識形態 • 國策 • 資源 • Scripted GUI • 科技 • 單位 |
地圖 | 地圖 • 地區 • 補給區域 • 戰略區域 |
圖形圖像 | 界面 • 圖形資產 • 實體 • 後特效 • 離子效果 • 字體 |
裝飾性 | 肖像 • 命名列表 • 音樂 • 音效 |
其他 | 控制台指令 • 故障排除 • 模組結構 • 成就代碼分析 |