(merge from offical wiki) |
小 (文本替换 - 替换“Relevant Dynamic Modding Statements”为“相关的动态修改语句”) |
||
(未显示同一用户的1个中间版本) | |||
第68行: | 第68行: | ||
The demerit is, it will instantly generate an "Edict Expired" notification. | The demerit is, it will instantly generate an "Edict Expired" notification. | ||
== | == 相关的动态修改语句 == | ||
Conditions: | Conditions: | ||
* <code>has_edict = <edict key></code> - Checks if the empire has this edict active. | * <code>has_edict = <edict key></code> - Checks if the empire has this edict active. | ||
{{ModdingNavbox}} | {{ModdingNavbox}} | ||
[[Category: | [[Category: 模组制作]] |
2022年3月16日 (三) 07:20的最新版本
This page is about how to modify existing and how to create new Edicts.
Edicts are defined at "common/edicts/xxx.txt".
Data Structure[编辑 | 编辑源代码]
- length = <int> - Days of the edict duration. If 0, this Edict immediately ends. If -1, this Edict lasts until manually toggled off.
- resources - An Economy Unit that determines the cost of this edict. Only the "cost" field is wanted. If length is -1, the cost is paid again when deactivating.
- prerequisites = { tech_xxx } - A list of Technology keys that determines the technology prerequisites of this edict.
- show_tech_unlock_if - A block of Conditions. If evaluated false, this edict will not be shown in the technology tooltip of that technology.
- modifier - A block of Modifiers to be applied to the empire for as long as this edict remain active.
- potential - A block of Conditions that determines is this edict listed for this empire. (Country scope)
- allow - A block of Conditions that determines can this edict be activated by this empire. (Country scope)
- effect - A block of Effects to be executed when this edict become active. (Country scope)
- There is NO effect block that can be executed when this edict is manually toggled off.
- ai_weight - The higher it is, the more likely the AI will try to activate this edict.
- edict_cap_usage - The number of Edict Capacities this Edict will use.
Vanilla Example[编辑 | 编辑源代码]
This is the education campaign.
education_campaign = { length = @campaignDuration resources = { category = campaigns cost = { energy = @campaignCost } } modifier = { species_leader_exp_gain = 0.25 } potential = { NOT = { has_ethic = ethic_gestalt_consciousness } has_technology = tech_planetary_unification } ai_weight = { weight = 0 modifier = { weight = 1 has_edict = healthcare_campaign } } }
Instant Effect Edicts[编辑 | 编辑源代码]
An edict with length = 0
and an effect
work like an empire wide Decision. The modifier
doesn't apply in this case.
# this instant effect edict costs 100 influence and provides 1000 unity. one_time_effect_edict_example = { length = 0 resources = { category = edicts cost = { influence = 100 } } effect = { add_resource = { unity = 1000 } } }
The demerit is, it will instantly generate an "Edict Expired" notification.
相关的动态修改语句[编辑 | 编辑源代码]
Conditions:
has_edict = <edict key>
- Checks if the empire has this edict active.
帝国 | 帝国 • 思潮 • 政府 • 国民理念 • 起源 • 承诺 • 议程 • 传统 • 飞升天赋 • 法令 • 政策 • 遗珍 • 科技 • 自定义帝国 |
人口 | 岗位 • 派系 |
领袖 | 领袖 • 领袖特质 |
物种 | 物种 • 物种特质 |
行星 | 行星 • 行星特征 • 轨道矿藏 • 建筑 • 区划 • 行星决议 |
星系 | 星系 • 恒星基地 • 巨型结构 • 虫洞 • 星门 • 地图 |
舰队 | 舰队 • 舰船 • 部件 |
地面战 | 陆军 • 轰炸姿态 |
外交 | 外交 • 联邦 • 星海共同体 • 评价修正 • 宣战理由 • 战争目标 |
事件 | 事件 • 异常现象 • 特殊项目 • 考古遗址 |
游玩 | 游玩 • 定义 • 研究 • 经济 • 游戏开局 |
动态修改 | 动态 • 指令效果 • 触发条件 • 作用域 • 修正 • 变量 • AI |
媒体/本地化 | Maya 导出器 • 图形 • 肖像 • 旗帜 • 事件图片 • 界面 • 图标 • 音乐 • 本地化 |
Other | 控制台命令 • 存档编辑 • Steam 创意工坊 • 模组制作教程 |