Why does Bohemia get the Restore Union CB over Hungary?

  • 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.

Pornek

Field Marshal
65 Badges
Aug 27, 2013
2.642
917
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Stellaris: Galaxy Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Nemesis
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
Am I reading the event wrong? shouldnt every country with a Habsburg ruler get the CB ? I didnt get it.
Code:
country_event = {
   id = flavor_hun.2
   title = flavor_hun.2.t
   desc = flavor_hun.2.d
   picture = ELECTION_REPUBLICAN_eventPicture

   fire_only_once = yes

   trigger = {
     tag = HUN
     is_year = 1450
     NOT = { is_year = 1457 }
     has_heir = no
     has_regency = no
     dynasty = "von Habsburg"
     NOT = { num_of_unions = 1 }
     any_country = {
       is_subject = no
       government = monarchy
       has_regency = no
       dynasty = "von Habsburg"
     }
   }
  
   mean_time_to_happen = {
     months = 1
   }
  
   option = {
     ai_chance = { factor = 75 }
     name = flavor_hun.2.a
     remove_historical_friend = HAB
     HAB = { remove_historical_friend = HUN }
     define_heir = {
       name = "Mátyás"
       dynasty = "Hunyadi"
       adm = 4
       dip = 5
       mil = 5
       claim = 25
       birth_date = 1443.2.23
     }
     kill_ruler = yes
     every_country = {
       limit = {
         NOT = { tag = ROOT }
         government = monarchy
         has_regency = no
         dynasty = "von Habsburg"
       }
       tooltip = {
         add_casus_belli = {  
           target = HUN
           type = cb_restore_personal_union
           months = 60
         }  
       }
       hidden_effect = {
         country_event = { id = flavor_hun.10 days = 1 }
       }
     }    
   }
   option = {
     name = flavor_hun.2.b  
     ai_chance = { factor = 25 }
     add_stability = 1
     random_country = {
       limit = {
         is_subject = no
         government = monarchy
         dynasty = "von Habsburg"
         has_regency = no
       }
       create_union = HUN
       hidden_effect = {
         country_event = { id = flavor_hun.3 days = 1 }
       }
     }
   }
}

OpPDy5z.jpg
 
  • 2
Reactions:

ForzaA

Thalassic QA
Paradox Staff
QA
69 Badges
Apr 1, 2001
10.288
1.546
  • Rome Gold
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • King Arthur II
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Starvoid
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Imperator: Rome Sign Up
  • Dungeonland
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • A Game of Dwarves
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
Then it will be a bug,

the code checks if the nation is a subject or not, unless I'm mistaken.
That's only the trigger though (and presumably HAB would ensure that one is true)

From the looks of it, the scripting is a bit "loose" here, and while it will generally work as intended, you ran into a situation where it isn't.

Filing a report in our internal database now.
 
  • 13
  • 4
Reactions:

Pornek

Field Marshal
65 Badges
Aug 27, 2013
2.642
917
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Stellaris: Galaxy Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Nemesis
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
I checked out the event a bit more. What I observed: Bohemia without fail, will always get the CB over Austria. No idea whats causing this but there might be another issue if it truly is supposed to be random.
Anyways I added "is_subject = no" in line 133 to limit the possible countries available for the 2nd part of the event and everything worked fine.
 

ForzaA

Thalassic QA
Paradox Staff
QA
69 Badges
Apr 1, 2001
10.288
1.546
  • Rome Gold
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • King Arthur II
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Starvoid
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Imperator: Rome Sign Up
  • Dungeonland
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • A Game of Dwarves
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
I checked out the event a bit more. What I observed: Bohemia without fail, will always get the CB over Austria. No idea whats causing this but there might be another issue if it truly is supposed to be random.
Anyways I added "is_subject = no" in line 133 to limit the possible countries available for the 2nd part of the event and everything worked fine.
From the way I'm reading it..
That's because it *isn't* supposed to be random.
It's supposed to be "all" that qualify (subjects shouldn't qualify; bug 1), but the triggered event that GIVES the CB is a fire_only_once (I consider this bug 2, given how things are written), and BOH comes ahead of HAB in the tag list, so gets the event first, and blocks it for everyone else.
 
  • 9
  • 2
Reactions:

Wizzington

Game Director (Victoria 3)
Paradox Staff
41 Badges
Nov 15, 2007
12.513
137.626
  • Hearts of Iron II: Armageddon
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars II
  • Sengoku
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis III Complete
  • March of the Eagles
  • Majesty 2
  • Magicka
  • Heir to the Throne
  • Arsenal of Democracy
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III Complete
  • Deus Vult
  • East India Company
  • Europa Universalis III
  • Divine Wind
  • For The Glory
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Prison Architect
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Mount & Blade: Warband
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
In short, the scripting for that event is really squirrely and should be fixed.
 
  • 10
  • 3
Reactions:

atwix

Manager of Micro
53 Badges
Mar 2, 2014
8.560
4.241
  • BATTLETECH: Flashpoint
  • Stellaris: Necroids
  • BATTLETECH
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun: Dragonfall
  • Cities: Skylines Industries
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Empire of Sin
  • Cities: Skylines - Mass Transit
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Darkest Hour
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
I have seen France getting restoration of Union cb on Hungary couple years into campaign, must be related.
 

Golladan

Field Marshal
68 Badges
Dec 25, 2013
4.938
3.132
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Rights of Man
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Knights of Pen and Paper 2
  • Cities: Skylines - After Dark
  • Crusader Kings II
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Stellaris - Path to Destruction bundle
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Warlock 2: The Exiled
  • Victoria 2
  • Europa Universalis IV
Anyways I added "is_subject = no" in line 133 to limit the possible countries available for the 2nd part of the event and everything worked fine.
Well no. Not everything works fine. Because the event that actually gives the CB, flavor_hun.10, can only fire once. So it'll still be only 1 country that gets the CB, instead of every qualifying Habsburg.
 

Pornek

Field Marshal
65 Badges
Aug 27, 2013
2.642
917
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Stellaris: Galaxy Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Nemesis
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria 2
  • Europa Universalis IV: El Dorado
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
Well no. Not everything works fine. Because the event that actually gives the CB, flavor_hun.10, can only fire once. So it'll still be only 1 country that gets the CB, instead of every qualifying Habsburg.

Yeah I realized that already following ForzA's 2nd post. But instead that any country whose tag is before HAB gets the CB if they have the Habsburg dynasty. Meaning the Bohemia player could just engineer a Habsburg dynasty and will get the CB regardless. RM Austria - decline event for z Podebrad ruler.

Im courious though. Is event supposed to be available for every country with a Habsburg dynasty or only for Austria ? Considering the removal of historical friend modifier with Austria. @Wiz @ForzaA
 
Last edited:
  • 1
Reactions:

semaphore

Sengoku Musou
127 Badges
Sep 17, 2005
6.196
483
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Europa Universalis 4: Emperor
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III: Collection
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Sengoku
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Tyranny: Gold Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall Premium edition
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
That's only the trigger though (and presumably HAB would ensure that one is true)

From the looks of it, the scripting is a bit "loose" here, and while it will generally work as intended, you ran into a situation where it isn't.

Filing a report in our internal database now.

I've observed that if Austria early PUs Bohemia, the restore union CB from the Hungary event always goes to Bohemia.
 

ForzaA

Thalassic QA
Paradox Staff
QA
69 Badges
Apr 1, 2001
10.288
1.546
  • Rome Gold
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • King Arthur II
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Starvoid
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Imperator: Rome Sign Up
  • Dungeonland
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • A Game of Dwarves
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
Yeah I realized that already following ForzA's 2nd post. But instead that any country whose tag is before HAB gets the CB if they have the Habsburg dynasty. Meaning the Bohemia player could just engineer a Habsburg dynasty and will get the CB regardless. RM Austria - decline event for z Podebrad ruler.

Im courious though. Is event supposed to be available for every country with a Habsburg dynasty or only for Austria ? Considering the removal of historical friend modifier with Austria. @Wiz @ForzaA
Usurping the rightful Habsburg heir (sh/w)ould affect all Habsburgs. Austria is "special" in that they're the "known" Habsburgs, and their historical friendship "ties in" with the shared dynasty (although it's more of a balancing factor to the event than anything)
 
  • 3
Reactions:

ForzaA

Thalassic QA
Paradox Staff
QA
69 Badges
Apr 1, 2001
10.288
1.546
  • Rome Gold
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • King Arthur II
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Starvoid
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Imperator: Rome Sign Up
  • Dungeonland
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • A Game of Dwarves
  • East India Company Collection
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Impire
I don't see any mention of it either, but from what I can see the version that's been tested as 1.15 does include the change.