Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

[flavor_chi.2100] 中国宝船舰队遭遇风暴

时间范围

  • 事件文件未指定 fromto 日期,为动态触发事件。
  • 触发概率:事件文件未指定 monthly_chance,为条件触发。

触发条件

  • 宝船舰队当前所在位置的地形为 deep_ocean(深海)。

关键效果

  • 选项: flavor_chi.2100.a
  • 效果:
    • 宝船航行货物数量将减少一个计算值 cargo_lost
    • cargo_lost 的计算方式如下:
      1. 初始值为当前宝船航行货物总量 (var:chinese_treasure_voyage_cargo)。
      2. 乘以一个在 5% 到 25% 之间的随机损失比例。
      3. 结果乘以 -1(转换为负值,表示减少)。
      4. 最终损失量会根据舰队指挥官 (scope:expedition_initiator.var:chinese_expedition_expedition_leader) 的军事能力 (mil) 进行修正。指挥官军事能力越高,实际损失比例越低。

背景介绍

在郑和率领的庞大宝船舰队远航印度洋期间,船队时常需要穿越广阔的深海区域。这些海域天气变幻莫测,突如其来的猛烈风暴对木质帆船和满载的货物构成了巨大威胁。此事件模拟了舰队在深海遭遇恶劣天气,导致部分货物损失的情况。船员的经验与指挥官的临场指挥能力,是决定损失大小的关键因素。

完整事件代码

flavor_chi.2100 = {
	type = country_event
	title = flavor_chi.2100.title
	desc = flavor_chi.2100.desc

	trigger = {
		scope:expedition_initiator ?= {
			var:chinese_treasure_fleet_location ?= {
				topography = deep_ocean
			}
		}
	}

	illustration_tags = {
        10 = regular
        10 = interior
    }

	immediate = {
		event_illustration_estate_effect = { foreground = estate_type:nobles_estate background = estate_type:nobles_estate }
		set_chinese_expedition_scopes = yes
		set_local_variable = {
			name = cargo_lost
			value = {
				value = var:chinese_treasure_voyage_cargo
				multiply = { 0.05 0.25 }
				multiply = -1
				multiply = {
					value = 1
					subtract = {
						value = scope:expedition_initiator.var:chinese_expedition_expedition_leader.mil
						divide = 100
						multiply = 0.5
					}
				}
			}
		}

		scope:expedition_initiator.var:chinese_treasure_fleet_location ?= {
			save_scope_as = target_location
		}
	}

	option = {
		name = flavor_chi.2100.a
		
		change_amount_of_treasure_voyage = {
			value = local_var:cargo_lost
		}
	}
}