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.2003] 中国宝船舰队位置移动

时间范围

  • 事件类型:动态历史事件(无固定时间范围,由游戏逻辑触发)
  • 触发概率:无固定月度概率,由游戏内部逻辑(on_chinese_expedition_location_move)控制触发时机

触发条件

  • 主要触发:由游戏内部机制 on_chinese_expedition_location_move 调用,通常关联于中国宝船舰队探险路线的推进或状态变更。
  • 备用触发:当舰队目标地块所属国家被吞并,导致 next_tile 作用域失效时,通过检查变量 chinese_treasure_fleet_locationchinese_expedition_route_deviation_return 进行容错处理。

关键效果

  • 唯一选项flavor_chi.2003.a(无具体效果描述,可能仅为确认或继续)
  • 核心操作
    1. 更新舰队位置:若 next_tile 作用域有效,将其值赋给变量 chinese_treasure_fleet_location
    2. 容错位置恢复:若 next_tile 失效,但检测到舰队位置变量中存在 chinese_expedition_route_deviation_return 变量,则使用该变量中保存的地块作为新的 next_tile,并更新舰队位置。
    3. 执行标准移动逻辑:调用 on_chinese_expedition_location_move 效果。
    4. 更新舰队状态:调用 chinese_expedition_status_change 效果。

背景介绍

此事件模拟了明朝郑和宝船舰队在远洋航行过程中的位置移动与路线管理。在游戏中,宝船舰队的探险是一个多阶段的过程,需要不断更新其所在位置以触发后续事件、交互或贸易活动。该事件作为舰队移动机制的核心,确保了即使因政治变动(如访问国被吞并)导致预定路线中断,舰队也能根据预设的备用路线或逻辑找到下一个目的地,维持探险的连续性。

完整事件代码

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

	hidden = yes

	immediate = {
		if = {
			limit = { exists = scope:next_tile }
			set_variable = {
				name = chinese_treasure_fleet_location
				value = scope:next_tile
			}
		}
		else_if = { # Failsafe for if the next_tile scope fails to pass when visited country is annexed
			limit = {
				has_variable = chinese_treasure_fleet_location
				var:chinese_treasure_fleet_location = {
					has_variable = chinese_expedition_route_deviation_return
				}
			}
			var:chinese_treasure_fleet_location = {
				var:chinese_expedition_route_deviation_return = {
					save_scope_as = next_tile
				}
			}
			set_variable = {
				name = chinese_treasure_fleet_location
				value = scope:next_tile
			}
		}

		on_chinese_expedition_location_move = yes

		chinese_expedition_status_change = yes
	}

	option = {
		name = flavor_chi.2003.a
		
	}

	after = {
	}
}