(merge from offical wiki) |
小 (文本替换 - 替换“Category:Modding”为“Category:模组制作”) |
||
第199行: | 第199行: | ||
{{ModdingNavbox}} | {{ModdingNavbox}} | ||
[[Category: | [[Category: 模组制作]] |
2022年3月8日 (二) 20:27的最新版本
The special project game data can be found in these files/folders: common/special_projects
Special Projects file structure[编辑 | 编辑源代码]
The file consists of a series of special_project = {}
entries.
Name | Description | Values | Required | Example |
---|---|---|---|---|
key | The ID of the project, it is used in events and also in the localisation file (description is expected as e.g. "MYMOD_EXAMPLE_1_PROJECT_DESC" ). |
String | Yes | key = "MYMOD_EXAMPLE_1_PROJECT" |
event_chain | An associated event chain. | ID of an existing Event chain | No | event_chain = "mymod_example_event_chain" |
picture | A picture for the project. | String | No | picture = GFX_evt_alien_nature |
sound | Does this project have a specific sound? | yes/no | No | sound = no |
icon | An icon to show on the left in the event log tree. | String | No | icon = "gfx/interface/icons/situation_log/situation_log_quest.dds" |
cost | Science point cost of the project (must be '0' if using days_to_research). | Integer | No | cost = 560 |
days_to_research | How many days it will take to complete this project. Either cost or days_to_research must be defined. | Integer | No | days = 180 |
tech_department | Which department will handle this. | physics_technology, society_technology, engineering_technology | Yes | tech_department = physics_technology |
same_option_group_as | If it is a sub-project of another | special_project ID | No | same_option_group_as = { KETLING_PROJECT_1 } |
AI_wait_days | AI will wait for the amount of days specified. Works like normal AI weight fields, with factor/add/weight. Country scope, FROM is creation scope | weight integer, modifier_rule fields | No |
AI_wait_days = { weight = 80 modifier = { factor = 0.5 has_ethic = ethic_fanatic_militarist } } |
timelimit | In how many days will this project fail, triggering the on_fail statement. | Integer, -1 for unlimited | No | timelimit = 100 |
location | Does this project have a specific location? | yes/no | No | location = no |
event_scope | The scope in which the statements run. | ship_event, planet_event | Yes | event_scope = planet_event |
requirements | Conditions needed to start the project.[more] | Conditions | No |
requirements = { shipclass_science_ship = 1 leader = scientist skill > 1 } |
abort_trigger | Ongoing project will be canceled if this trigger returns true
|
Conditions | No |
abort_trigger = { NOT = { exists = fromfrom } } |
on_start | Statements to run when the project starts.
|
Statements | No |
on_start = { owner = { set_country_flag = started_x_project } } |
on_success / on_progress_25/50/75 | Statements to run when the project is complete.
|
Statements | Yes |
on_success = { owner = { country_event = { id = mymod.event.1 } } } on_success = { ship_event = { id = mymod.anomaly.1 } } |
on_cancel | Statement fires if the abort trigger returns true
|
Statements | No | on_cancel = {} |
on_fail | Statements to run when the project fails.
|
Statements | Yes | on_fail = { #times out
owner = { country_event = { id = federations3.2129 } } } |
requirements[编辑 | 编辑源代码]
Requirements use condition-like syntax, but they have their own set of commands. They do not support AND and OR commands.
Name | Description | Values | Required | Example |
---|---|---|---|---|
leader | The type of leader needed at location. | scientist, admiral, general, ruler, governor | No | leader = scientist |
skill | The skill level of the leader. | Integer | No | skill > 2 |
has_trait | The leader must have this trait | Leader trait ID | No | has_trait = leader_trait_expertise_voidcraft |
shipclass_military | The number of military ships required. | Integer | No | shipclass_military = 1 |
shipclass_constructor | The number of constructor ships required | Integer | No | shipclass_constructor = 1 |
shipclass_science_ship | The number of science ships required | Integer | No | shipclass_science_ship = 1 |
shipclass_colonizer | The number of colonizers required | Integer | No | shipclass_colonizer = 1 |
shipclass_transport | The number of transport ships required | Integer | No | shipclass_transport = 1 |
assault_armies | The number of assault armies required | Integer | No | assault_armies = 1 |
defense_armies | The number of defense armies required | Integer | No | defense_armies = 2 |
research_station | Is a research station required at location? | yes | No | research_station = yes |
mining_station | Is a mining station required at location? | yes | No | mining_station= yes |
observation_station | Is an observation station required at location? | yes | No | observation_station = yes |
fleet_power | If shipclass_military the power of the fleet required | Integer | No | fleet_power > 999999 |
is_founder_species | Does owner has to be a founder species? | yes | No | is_founder_species = yes |
Example[编辑 | 编辑源代码]
requirements = { shipclass_science_ship = 1 leader = scientist skill > 2 }
Usage[编辑 | 编辑源代码]
Once you have a special project defined, you can start it in an event by using the enable_special_project
command. The command has three parameters:
Name | Description | Example |
---|---|---|
name | The key of the special project. | name = "MYMOD_EXAMPLE_1_PROJECT" |
location | The location where the event takes place, for events with no location, it’s usually set to the capital. |
capital_scope = { enable_special_project = { name = "MYMOD_EXAMPLE_1_PROJECT" location = this owner = root } } |
owner | The country which will have this project enabled. | owner = root |
Example[编辑 | 编辑源代码]
enable_special_project = { name = "MYMOD_EXAMPLE_1_PROJECT" location = this owner = root }
There is also the abort_special_project
command to end a special project, it is used like:
abort_special_project = { type = MYMOD_EXAMPLE_1_PROJECT location = capital_scope }
The country is inferred from the location parameter.
A trigger example: has_special_project = CAPTURE_QUEEN
Localisation[编辑 | 编辑源代码]
The localisation entries depend on the key property. The key is used for title and key_DESC is used for description.
Example[编辑 | 编辑源代码]
MYMOD_EXAMPLE_1_PROJECT:0 "Example title" MYMOD_EXAMPLE_1_PROJECT_DESC:0 "Example description"
帝国 | 帝国 • 思潮 • 政府 • 国民理念 • 起源 • 承诺 • 议程 • 传统 • 飞升天赋 • 法令 • 政策 • 遗珍 • 科技 • 自定义帝国 |
人口 | 岗位 • 派系 |
领袖 | 领袖 • 领袖特质 |
物种 | 物种 • 物种特质 |
行星 | 行星 • 行星特征 • 轨道矿藏 • 建筑 • 区划 • 行星决议 |
星系 | 星系 • 恒星基地 • 巨型结构 • 虫洞 • 星门 • 地图 |
舰队 | 舰队 • 舰船 • 部件 |
地面战 | 陆军 • 轰炸姿态 |
外交 | 外交 • 联邦 • 星海共同体 • 评价修正 • 宣战理由 • 战争目标 |
事件 | 事件 • 异常现象 • 特殊项目 • 考古遗址 |
游玩 | 游玩 • 定义 • 研究 • 经济 • 游戏开局 |
动态修改 | 动态 • 指令效果 • 触发条件 • 作用域 • 修正 • 变量 • AI |
媒体/本地化 | Maya 导出器 • 图形 • 肖像 • 旗帜 • 事件图片 • 界面 • 图标 • 音乐 • 本地化 |
Other | 控制台命令 • 存档编辑 • Steam 创意工坊 • 模组制作教程 |