命令百科

effect · news_event

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Fires a news event.
Example:
news_event = {
	id = news.251 # The event to fire.
	# Optional Fields:
	hours = 12 # The number of hours to wait before firing the event.
	days = 5 # The number of days to wait before firing the event.
	months = 1 # The number of months to wait before firing the event, where a month is treated as 30 days.
		# Note:  hours, days, and months can all be used and will simply be added together.
	random_hours = 18 # A random amount of hours to be added to the delay before firing, from 0 up to but not including random_hours.
	random_days = 2 # A random amount of days to be added to the delay before firing, from 0 up to but one hour less than random_days.
		# Note:  random_hours and random_days can both be used and will simply be added together.
	random = 6 # Equivalent to random_hours; preserverd for backwards compatibility.
	random = { chance = 50 ... } # Specify a set of child effects to execute as part of this effect, with a percentage chance of randomly happening or not (as a group, not individually).
	tooltip = news.251.t # Manually specify which tooltip to use for this effect.
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

news_event 最常用于重大历史事件触发后向全球玩家广播战略动态,例如某国宣战、完成特定国策或科技突破时,让所有人通过新闻界面感知世界变化。在 mod 中常配合 country_event 使用——先用 country_event 处理当事国的内部逻辑,再用 news_event 向世界发布公告。

# 在某国完成"征服"国策后触发
complete_national_focus = focus_conquest
hidden_effect = {
    news_event = {
        id = my_mod_news.1
        hours = 6
        random_hours = 12
    }
}

配合关系

  • [country_event](/wiki/effect/country_event):当事国先通过 country_event 处理选项与内部状态变更,随后在 immediate 或选项块中调用 news_event 对外广播,两者分工明确。
  • [add_named_threat](/wiki/effect/add_named_threat):侵略性事件触发新闻的同时往往伴随全球威胁值上升,两者几乎成对出现以体现事件的外交影响。
  • [has_completed_focus](/wiki/trigger/has_completed_focus):常作为事件或决议的触发条件,判断某国是否完成了特定国策,从而决定是否触发对应的新闻事件。
  • [create_wargoal](/wiki/effect/create_wargoal):宣战/索取领土等强硬行为通常会同步触发一条新闻事件,让其他国家及玩家得知局势升级。

常见坑

  1. 作用域混淆news_event 只能在 COUNTRY scope 下调用,若在 STATEUNIT_LEADER scope 下使用会静默失效,新手常在 every_owned_state 的内层块里误写此命令而不见任何新闻弹出。
  2. 延迟字段叠加被忽视hoursdaysmonthsrandom_hoursrandom_days 会相互叠加,若同时写了多个延迟字段却以为只有最后一个生效,会导致新闻在意料之外的时间点才触发,调试时容易误判为事件未触发。