小 (RemixMe移动页面Disease modding至疾病模组制作) |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{version|2.6}} | {{version|2.6}} | ||
==Definitions== | |||
[[Disease]]s are defined in folder <code>common/diseases/</code>. | [[Disease]]s are defined in folder <code>common/diseases/</code>. | ||
第19行: | 第21行: | ||
|contagiousness | |contagiousness | ||
|float | |float | ||
| | |Chance that the disease will spread to an adjacent province ? | ||
|<code>contagiousness = 0.15</code> | |<code>contagiousness = 0.15</code> | ||
|- | |- | ||
|outbreak_chance | |outbreak_chance | ||
|float | |float | ||
| | |Chance that a disease will appear in a province. | ||
Notes: | |||
* With less provinces, you get much more disease - the vanilla numbers are balanced for vanilla map province count ! | |||
|<code>outbreak_chance = 0.01</code> | |<code>outbreak_chance = 0.01</code> | ||
|- | |- | ||
第192行: | 第196行: | ||
|on_character_infection | |on_character_infection | ||
|[[commands]] | |[[commands]] | ||
| | |Scripted effects to give the epidemic trait to a character. Typically uses a <code>random_list</code> to specify a ratio of randomly affected characters. | ||
| | | | ||
|- | |- | ||
第204行: | 第208行: | ||
| | | | ||
|<code>disease_gfx = disease_gfx_typhoid_fever</code> | |<code>disease_gfx = disease_gfx_typhoid_fever</code> | ||
|- | |||
|max_total_provinces | |||
|int | |||
| | |||
|<code>max_total_provinces = 5</code> | |||
|- | |||
|spread_through_water | |||
|bool | |||
| | |||
|<code>spread_through_water = no</code> | |||
|- | |||
|min_nb_province | |||
|int | |||
|Ignored if the given value is 0. | |||
|<code>min_nb_province = 1</code> | |||
|- | |||
|max_nb_province | |||
|int | |||
|Ignored if the given value is 0. | |||
|<code>max_nb_province = 1</code> | |||
|} | |} | ||
== Scripting == | |||
There a a few ways that events can interact with epidemics: | |||
* activate_disease = <disease_name> will allow diseases that are off by default to spawn randomly or via scripting. | |||
* reduce_disease = <double> will weaken an existing epidemic in a province. <code>reduce_disease = 1</code> should be able to cancel an epidemic in a province. | |||
* spawn_disease = <disease_name> will start an epidemic in a province. | |||
* start_outbreak = <disease_name> will start a epidemic using the information defined in the diseases timeperiod entries | |||
[[Category:Modding]] | [[Category:Modding]] | ||
{{ModdingNavbox}} | {{ModdingNavbox}} |
2019年11月9日 (六) 16:20的版本
Definitions
Diseases are defined in folder common/diseases/
.
Configuration key | Type | Description | Example | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rip | bool |
|
rip=no
| |||||||||||||||||||||||||||||||||||||||
contagiousness | float | Chance that the disease will spread to an adjacent province ? | contagiousness = 0.15
| |||||||||||||||||||||||||||||||||||||||
outbreak_chance | float | Chance that a disease will appear in a province.
Notes:
|
outbreak_chance = 0.01
| |||||||||||||||||||||||||||||||||||||||
effect | modifiers | Province modifiers applied during an outbreak. |
effect = { city_tax_modifier = -0.5 supply_limit = -4 max_attrition = 0.05 } | |||||||||||||||||||||||||||||||||||||||
icon | int | The index of icon frame in GFX_disease_icons | icon = 1
| |||||||||||||||||||||||||||||||||||||||
tooltip | key | Localization key for disease description | tooltip = TUBERCULOSIS_INFO
| |||||||||||||||||||||||||||||||||||||||
months | int | Duration of an outbreak. | months = 30
| |||||||||||||||||||||||||||||||||||||||
trait | trait | Associated epidemic trait when a character gets the disease. | trait = has_tuberculosis
| |||||||||||||||||||||||||||||||||||||||
always_get_message | bool | always_get_message = no
| ||||||||||||||||||||||||||||||||||||||||
color | color | Color for epidemics mapmode. | color = { 84 171 176 }
| |||||||||||||||||||||||||||||||||||||||
major | bool | major = yes
| ||||||||||||||||||||||||||||||||||||||||
active | bool | Whether the disease exists at game start, or needs to get activated via scripting command activate_disease .
|
active = no
| |||||||||||||||||||||||||||||||||||||||
timeperiod | clause | Validity range for the disease.
|
timeperiod = { start_date = 769.1.1 end_date = 1452.1.1 one_only = no } timeperiod = { start_date = 1100.1.1 end_date = 1400.1.1 outbreak_chance = 0.01 can_outbreak = { total_years_played = 25 NOT = { has_global_flag = black_death_happened } has_game_rule = { name = epidemics value = delayed_dynamic } } min_nb_province = 1 max_nb_province = 15 one_only = yes province_infection_duration = 36 outbreak_scenario = { # Classic plague chance = 0.30 start_provinces = { 1448 } excluded_regions = { custom_historical_plague_free_zone } } } | |||||||||||||||||||||||||||||||||||||||
yearly_province_pulse | commands | |||||||||||||||||||||||||||||||||||||||||
character_infection_chances | clause | character_infection_chances = { months = 3 } | ||||||||||||||||||||||||||||||||||||||||
on_character_infection | commands | Scripted effects to give the epidemic trait to a character. Typically uses a random_list to specify a ratio of randomly affected characters.
|
||||||||||||||||||||||||||||||||||||||||
on_province_infection | commands | |||||||||||||||||||||||||||||||||||||||||
disease_gfx | disease_gfx = disease_gfx_typhoid_fever
| |||||||||||||||||||||||||||||||||||||||||
max_total_provinces | int | max_total_provinces = 5
| ||||||||||||||||||||||||||||||||||||||||
spread_through_water | bool | spread_through_water = no
| ||||||||||||||||||||||||||||||||||||||||
min_nb_province | int | Ignored if the given value is 0. | min_nb_province = 1
| |||||||||||||||||||||||||||||||||||||||
max_nb_province | int | Ignored if the given value is 0. | max_nb_province = 1
|
Scripting
There a a few ways that events can interact with epidemics:
- activate_disease = <disease_name> will allow diseases that are off by default to spawn randomly or via scripting.
- reduce_disease = <double> will weaken an existing epidemic in a province.
reduce_disease = 1
should be able to cancel an epidemic in a province. - spawn_disease = <disease_name> will start an epidemic in a province.
- start_outbreak = <disease_name> will start a epidemic using the information defined in the diseases timeperiod entries
模组制作
历史 | 角色 • 家族 • 省份 • 头衔 • 剧本 |
脚本 | 指令 • 条件 • 作用域 • 修正 • 事件 • 决议 |
常规 | 定义 • 游戏规则 • 另类开局 • 宗教 • 文化 • 政体 • 特质 • 血脉 • 科技 • 法律 • 建筑 • 宣战理由 • 朝贡国 • 单位 • 目标 • 疾病 • 死亡 • 荣誉头衔 • 社团 • 宝物 • 地图外政权 • 内阁成员 • 贸易路线 • 继承 • 奇观 • 称号 |
图像/音效/本地化 | 地图 • 图形 • 盾徽 • 肖像 • 界面 • 小地图 • 音乐 • 本地化 |
其他 | 故障排除 • 验证器 • 控制台指令 • 编辑游戏存档 • Steam创意工坊 • EU4转档器模组制作 |