• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Tebriel

Captain
75 Badges
Aug 6, 2007
358
174
  • Majesty 2 Collection
  • Europa Universalis IV
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Rome Gold
  • Warlock: Master of the Arcane
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III Complete
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Digital Anniversary Edition
  • Knights of Honor
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Mount & Blade: Warband
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Cities: Skylines
Title covers it all - any way to add those top of the screen notifications via a mod?

Edit - I might be calling them the wrong name, maybe alerts? I'm referring to those little flags that drop down under the top information bar.
 
Last edited:
Title covers it all - any way to add those top of the screen notifications via a mod?

Edit - I might be calling them the wrong name, maybe alerts? I'm referring to those little flags that drop down under the top information bar.
Yea, it can be done. I created a few of them for GeS. You clone an existing one, rename it, and replace the conditions with a scripted gui setup.
 
  • 1Like
Reactions:
Yeah that's an impressive sized mod.

I've gotten an alert to show, but definitely seems a little tricky. Can't get it to only show when I want it to yet, or even manually dismiss. I wish we had documentation for this stuff. :(
 
The GeS mod has been a helpful reference.

Not sure if anyone can clarify, but I'm not sure how the "visible" part of this works. I can get an alert to work if I only have the AlertManager.ShowAlert() part, but that ScriptedGui thing is a mystery. I see there's an alert named unmarried_heir_alert referred to here, but it's not doing anything.

###########################
#Unmarried Heir
###########################

alert = {
size = { 58 80 }
datacontext = "[GetScriptedGui('unmarried_heir_alert')]"
visible = "[And(ScriptedGui.IsShown(GuiScope.SetRoot(AlertManager.GetPlayer.MakeScope).End), AlertManager.ShowAlert('unmarried_heir'))]"
tooltip = "TT_UNMARRIED_HEIR"

blockoverride "Color"
{
frame = 8
}
using = yellow_alert
blockoverride "button_click"
{
onclick = "[OpenGameView('government')]"
onrightclick = "[AlertManager.ToggleShowAlert('unmarried_heir')]"
}

blockoverride "Icon"
{
texture = "gfx/interface/icons/shared_icons/fertility.dds"
using = alert_icon_size
}
}

unmarried_heir_alert = {
scope = country

is_shown = {
is_republic = no
has_primary_heir = yes
any_character = {
is_primary_heir = yes
age >= 15
is_married = no
}
}
}

Also not sure why there's both unmarried_heir and unmarried_heir_alert instead of just one or the other name.
 
Got it - turned out I had a newline in that quoted visible = "" part, and that doesn't work, it needs to be a single line.
It looked like it could be multi-line in the example I was using, due to some auto-wrapping in a text viewer.
 
  • 1Like
Reactions:
Hmm, so I've got the alert I need working. BUT it seems like alert tooltips are usually (always?) hardcoded. I'm specifically talking about the ones that provide extra info, such as a list of places where "starving pops" are, or a list of rebellious provinces.

Am I correct in thinking there's no way to add dynamic tooltips to alerts? Specifically I want to add a list of characters based on a number of conditions.