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_son.1001 马格里布学者

时间范围:无特定起止日期(动态事件) 触发概率:未指定每月概率(monthly_chance

触发条件

事件为动态触发,无预设trigger条件。事件执行时,会立即进行以下操作:

  1. 将当前国家的统治者或摄政保存为 target_character
  2. 在马格里布地区(region:maghreb_region)寻找人口最多的一个省份,并将其位置保存为 target_location
  3. target_location 创建一个新人物(target_character2),其属性为:
    • 艺术家技能:0.8
    • 职业:科学家
    • 阶层:市民阶层
    • 创建于“虚空”(create_in_limbo = yes

关键效果

选项 A:flavor_son.1001.a

  • 触发前提:变量 hajj_money 的值大于等于 500。
  • 效果
    • 将新创建的科学家 target_character2 移动至玩家国家。
    • 扣除 500 金币(通过 add_gold = -500 实现)。
    • 将变量 hajj_money 的值减少 500。

选项 B:flavor_son.1001.b

  • 效果
    • 静默处决新创建的科学家 target_character2

背景介绍

此事件模拟了统治者(或摄政)在马格里布地区寻访并招揽一位本地科学家的过程。玩家需要决定是否花费一笔资金(500金币)来聘请这位学者为国效力,或者选择放弃这次机会。

完整事件代码

flavor_son.1001 = {
	type = country_event
	title = flavor_son.1001.title
	desc = flavor_son.1001.desc

	illustration_tags = {
		10 = happy
		10 = exterior
	}

	immediate = {
		event_illustration_estate_effect = { foreground = estate_type:nobles_estate background = estate_type:nobles_estate }
		ruler_or_regent ?= {
			save_scope_as = target_character
		}

		region:maghreb_region = {
			ordered_location_in_region = {
				order_by = population
				max = 1
				check_range_bounds = no
				save_scope_as = target_location
			}
		}

		create_character = {
			artist_skill = 0.8
			artist = scientist
			estate = estate_type:burghers_estate
			birth_location = scope:target_location
			save_scope_as = target_character2
			create_in_limbo = yes
		}
	}

	option = {
		name = flavor_son.1001.a

		trigger = {
			var:hajj_money >= 500
		}

		scope:target_character2 = {
			move_country = root
		}

		hidden_effect = {
			change_variable = { name = hajj_money subtract = 500 }
		}

		custom_tooltip = son_show_hajj_money_tt

		show_as_tooltip = {
			add_gold = -500
		}
	}

	option = {
		name = flavor_son.1001.b

		custom_tooltip = son_continue_hajj_tt
   		kill_character_silently = scope:target_character2
	}

	after = {
		trigger_event_silently = { id = flavor_son.1002 days = 15 }
	}
}