小 (波兰属三稽帝国移动页面On actions至执行) |
小 (文本替换 - 替换“[[Category:”为“[[分类:”) |
||
第487行: | 第487行: | ||
{{Modding navbox}} | {{Modding navbox}} | ||
[[ | [[ 分类:Modding]] |
2022年12月5日 (一) 15:45的版本
杂项
名称 | 描述 | 示范 | 注释 | 添加版本 |
---|---|---|---|---|
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 |
模组制作
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |