Wiki

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 会相互叠加,若同时写了多个延迟字段却以为只有最后一个生效,会导致新闻在意料之外的时间点才触发,调试时容易误判为事件未触发。

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

news_event is most commonly used to broadcast major historical events to all global players after significant triggers occur, such as when a country declares war, completes a specific national focus, or achieves a technology breakthrough. This allows everyone to perceive world changes through the news interface. In mods, it is often used in conjunction with country_event—first use country_event to handle the internal logic of the nation in question, then use news_event to publish an announcement to the world.

# Triggered after a certain country completes the "Conquest" focus
complete_national_focus = focus_conquest
hidden_effect = {
    news_event = {
        id = my_mod_news.1
        hours = 6
        random_hours = 12
    }
}

Synergy

  • [country_event](/wiki/effect/country_event): The nation in question first handles options and internal state changes through country_event, then calls news_event in the immediate block or option blocks to broadcast externally. The two have clear divisions of labor.
  • [add_named_threat](/wiki/effect/add_named_threat): Aggressive events that trigger news items are typically accompanied by a rise in global threat values; the two almost always appear as a pair to reflect the diplomatic impact of the event.
  • [has_completed_focus](/wiki/trigger/has_completed_focus): Commonly serves as a trigger condition for events or decisions to determine whether a country has completed a specific national focus, thus deciding whether to trigger the corresponding news event.
  • [create_wargoal](/wiki/effect/create_wargoal): Aggressive actions such as declaring war or claiming territory typically trigger a news event simultaneously, allowing other nations and players to learn of the escalation.

Common Pitfalls

  1. Scope Confusion: news_event can only be called within the COUNTRY scope. Using it in STATE or UNIT_LEADER scope will silently fail. Beginners often mistakenly write this command inside nested blocks of every_owned_state and see no news popup appear.
  2. Delay Field Stacking Overlooked: hours, days, months combined with random_hours, random_days accumulate with each other. If you specify multiple delay fields simultaneously but assume only the last one takes effect, the news will trigger at an unexpected time. This is easy to misdiagnose as the event not triggering during debugging.