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.2101] 中国宝船舰队遭遇海盗

时间范围

此事件为动态历史事件,无固定 fromto 日期。当触发条件满足时,每月有一定概率发生(具体概率取决于游戏内 monthly_chance 机制,代码中未明确指定)。

触发条件

  • 舰队位置:中国宝船舰队(scope:expedition_initiator.var:chinese_treasure_fleet_location)当前必须位于一个地形为 海峡(topography = narrows 的地点。

关键效果

  • 选项名称flavor_chi.2101.a
  • 主要影响
    1. 货物损失:宝船航行的货物(treasure_voyage_cargo)将减少一定数量。具体损失量(cargo_lost)基于初始货物量的10%-20%,并受到舰队指挥官军事能力(mil)的负向修正(指挥官能力越高,损失越少)。
    2. 威望提升:国家获得少量威望(prestige_mild_bonus)。
    3. 外交关系改善:系统会筛选出舰队所在省份相邻、且非本国或非海盗政府(pirate_brethren_reform)的邻国,从中选取 人口最多的前6个国家,使其对事件发起国获得一个名为 chi_grateful_for_pirate_defeat (因击败海盗而感激)的外交好感度修正。

背景介绍

在郑和率领的明朝庞大宝船舰队远航期间,船队时常需要穿越遍布东南亚群岛的狭窄海峡。这些水道不仅是贸易要道,也是海盗伏击的理想地点。当庞大的中国舰队在这些险要之地遭遇海盗袭扰时,其强大的军事存在不仅能保护自身船队,也常常为途经地区的其他商船和国家扫清威胁,从而在区域内赢得声誉与感激。

完整事件代码

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

	trigger = {
		scope:expedition_initiator.var:chinese_treasure_fleet_location ?= {
			topography = narrows
		}
	}

	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.1 0.2 }
				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
		}

		scope:expedition_initiator.var:chinese_treasure_fleet_location.province_definition = {
			every_location_in_province_definition = {
				every_neighbor_location = {
					if = {
						limit = {
							owner ?= { 
								NOT = { this = ROOT }
								NOT = { has_reform = government_reform:pirate_brethren_reform }
							}
						}
						owner = { add_to_list = list_of_grateful_countries }
					}
				}
			}
		}
	}

	option = {
		name = flavor_chi.2101.a
		
		change_amount_of_treasure_voyage = {
			value = local_var:cargo_lost
		}
		add_prestige = prestige_mild_bonus

		ordered_in_list = {
			list = list_of_grateful_countries
			order_by = total_population
			max = 6
			add_opinion = {
				modifier = chi_grateful_for_pirate_defeat
				target = ROOT
			}
		}
	}
}