effect · scoped_sound_effect
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Plays sound effect only on in current scope's player
scoped_sound_effectCOUNTRYnonePlays sound effect only on in current scope's player
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.
scoped_sound_effect is commonly used when events or decisions are triggered to play a specific sound effect only to the human player controlling the current nation, without disturbing other multiplayer players or AI—for example, audio feedback at dramatic moments like technology breakthroughs, diplomatic successes, or national crises. It is particularly valuable in multiplayer mods because it can precisely deliver sound cues that "belong to this nation."
country_event = {
id = my_mod.1
option = {
name = my_mod.1.a
# Play victory fanfare only to the player controlling the nation that triggered this event
scoped_sound_effect = "my_mod_victory_fanfare"
}
}
[country_event](/wiki/effect/country_event) — Used alongside event triggers; within the option block, it plays sound effects appropriate to the narrative context, enhancing storytelling immersion.[add_political_power](/wiki/effect/add_political_power) — Play a positive prompt sound while granting political power, providing immediate audio feedback to the player.[add_ideas](/wiki/effect/add_ideas) — Synchronize sound effects when adding national focuses or advisors, emphasizing the perceptual signal that "an important change has occurred."[has_country_flag](/wiki/trigger/has_country_flag) — Serves as a precondition check before playing sound effects, preventing accidental duplicate triggers of the same sound within a single sequence.every_owned_state or every_unit_leader, it produces no effect and raises no error, resulting in silent audio that is difficult to debug.