杂项
名称 | 描述 | 示范 | 注释 | 添加版本 |
---|---|---|---|---|
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 is the country that is hosting the government in exile. | 1.6 |
on_host_changed_from_capitulation | Trigger the following commands whenever a country that is hosting a government in exile has capitulated. | on_host_changed_from_capitulation= { effect = { = {...} }
|
ROOT is the government in exile, FROM is the new country hosting the government in exile, FROM:FROM is the old country that was hosting the government in exile. | 1.6 |
on_exile_government_reinstated | Trigger the following commands whenever a country has returned from governing in exile. | on_exile_government_reinstated = { effect = { = {...} }
|
ROOT is the government in exile, FROM is the country that was hosting the government in exile. | 1.6 |
省份
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_state_control_changed | Trigger the following commands when a state's controller changes. | on_state_control_changed = { effect = { ... } }
|
ROOT is new controller, FROM is old controller, FROM.FROM is state ID. | 1.0 |
战争目标
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_justifying_wargoal_pulse | Trigger the following commands whenever the country is targeted by a wargoal under justification. | on_justifying_wargoal_pulse = { random_events = { 100 = war_justification.1 } }
|
FROM = target nation. Checked every day. | 1.0 |
on_wargoal_expire | Trigger the following commands whenever a wargoal expire. | on_wargoal_expire = { random_events = { 100 = war_justification.301 } }
|
FROM is the wargoal owner. | 1.0 |
领袖
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_unit_leader_created | Trigger the following commands when an army leader is created. | on_unit_leader_created= { effect = {...} }
|
FROM is owner country, ROOT is the unit leader | 1.5 |
on_army_leader_daily | Trigger the following commands on an army leader each day. | on_army_leader_daily = { effect = {...} }
|
FROM is owner country. | 1.0 |
on_army_leader_won_combat | Trigger the following commands whenever an army leader won a combat. | on_army_leader_won_combat = { effect = {...} }
|
FROM is owner country. | 1.0 |
on_army_leader_lost_combat | Trigger the following commands whenever an army leader lost a combat. | on_army_leader_lost_combat = { effect = {...} }
|
FROM is owner country. | 1.0 |
on_unit_leader_level_up | Trigger the following commands when a leader gain a level. | on_unit_leader_level_up = { effect = {...} }
|
1.0 | |
on_army_leader_promoted | Trigger the following commands whenever an army leader is 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 | Trigger the following commands whenever an ace is created. | on_ace_promoted = { random_events = { 100 = ace_promoted.1 } }
|
FROM = ace. | 1.0 |
on_ace_killed | Trigger the following commands whenever an aces is killed. | on_ace_killed = { random_events = { 100 = ace_died.1 } }
|
FROM = ace. | 1.0 |
on_ace_killed_on_accident | Trigger the following commands whenever our aces died on accident. | on_ace_killed_on_accident = { random_events = { 100 = ace_died.1 } }
|
FROM = our ace died in accident. | 1.9 |
on_non_ace_killed_other_ace | Trigger the following commands whenever non ace killed enemy ace. | on_non_ace_killed_other_ace = { FROM = { random_events = { 100 = ace_died.1 } } }
|
FROM = enemy ace. | 1.9 |
on_ace_killed_by_ace | Trigger the following commands whenever an aces is killed by another ace. | on_ace_killed_by_ace = { random_events = { 100 = ace_killed_by_ace.1 } }
|
FROM = our ace, PREV = enemy ace, has killed FROM. | 1.0 |
on_ace_killed_other_ace | Trigger the following commands whenever an aces is killed by another ace (surviving ace side). | on_ace_killed_other_ace = { random_events = { 100 = ace_killed_other_ace.1 } }
|
FROM = our ace, PREV = enemy ace, killed by FROM. | 1.0 |
on_aces_killed_each_other | Trigger the following commands whenever two aces kill each other in air duel. | on_aces_killed_each_other = { random_events = { 100 = aces_killed_each_other.1 } }
|
FROM = ace, PREV = enemy ace. | 1.0 |
抵抗运动
Name | Description | Examples | Notes | Version Added |
---|---|---|---|---|
on_operation_completed | Trigger the following commands whenever an operative completed. | on_operation_completed = { effect = {...} }
|
THIS - the operative, ROOT - the initiating country, FROM - the target country. | 1.9 |
on_operative_detected_during_operation | 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, FROM.FROM - operation state (will only be set if the operation has a specific selection_target). | 1.9 |
on_operative_on_mission_spotted | Trigger the following commands whenever an operative performing an offensive mission in a country. | on_operative_on_mission_spotted = { effect = {...} }
|
THIS - the operative, FROM - the country the operative was performing its mission in, ROOT - the country the operative is operating for. | 1.9 |
on_operative_captured | Trigger the following commands whenever an operative is captured. | on_operative_captured = { effect = {...} }
|
THIS - the operative, ROOT - the country the operative was performing its mission in, FROM - the country the operative is operating for. | 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 |
模组制作
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |