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

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
There are lots of bug reports about War in Heaven, so I decided to look at those event scripts and tried to mod those bugs out. I discovered that most bugs reported are from a single cause: War in Heaven scripts are written under assumption that there are only two awaken fallen empires, one awakes first and the second awakes as rival of the first. But in fact there can be a third one, awake to defend against crisis. What makes things worse are that the third uses some same script to awaken as the first, and that the third and the second can be the same FE. Those makes a lot of scripts behave erroneously.

Details:
Both general awaken (fallen_empires_awakening.1, which can lead to war in heaven) and crisis awaken (fallen_empires_awakening.4) call event fallen_empires_awakening.3 to do the job. That event set a country flag sleepers_awake_first_sleeper, which is checked in numerous places in war in heaven events, and nowhere else. So clearly, that country flag shall be moved to fallen_empires_awakening.1.

war_in_heaven.10 (event that determine if one AFE in WiH falls) fails to consider possible existence of crisis AFE. Both its trigger and its action need more checks, such as
OR = {
has_country_flag = sleepers_awake_ancient_rival
has_country_flag = sleepers_awake_first_sleeper
}

That check is also needed in following events: war_in_heaven.13, war_in_heaven.15 (both in applying opinion modifier). war_in_heaven.16 (in declaring war), war_in_heaven.17 (in checking no AFE in WiH).

war_in_heaven.16 need to get NOT = { has_country_flag = sleepers_awake_first_sleeper } replaced with has_country_flag = sleepers_awake_ancient_rival , when select the second AFE in WiH.

Another issue:
Leader of LNAP can leave the federation, yet it does not lose its leader status. There should be an event check and deal with that.


@Wiz , hope your scripts are fixed in 1.4.
 
  • 1
Reactions:
Upvote 0

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
After some more thoughts, I find an oversight in my opening post as well.
If an FE is chosen both as potential crisis defender and rival of the first AFE, and awake as crisis defender, it will block War in Heaven initiation (war_in_heaven.1). That by itself won't lead to anything wrong, so it's ok to leave it as is. If that blockage is deemed undesirable, we should either make those flags mutual exclusive, or add a separate event to deal with such situation.
Conversely, if such FE awake as WiH combatant, it will also block its awaken as crisis defender. Granted, crisis defender is currently not involved in crisis event chains any further, so that is non-issue right now.
 
  • 1
Reactions:

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III

Risa

Lt. General
92 Badges
Mar 2, 2005
1.242
278
  • Semper Fi
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Heir to the Throne
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Surviving Mars: First Colony Edition
  • Europa Universalis III
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • East India Company Collection
  • Arsenal of Democracy
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
Bump, as it is not yet fixed in 1.4.1.

Also another error: in event war_in_heaven.13, there is code supposedly adding opinion modifier between AFEs and LNAP leader,
Code:
   every_country = {
    limit = {
     is_country_type = awakened_fallen_empire
    }
    add_opinion_modifier = { who = from modifier = opinion_non_aligned_league_fe }
    from = { add_opinion_modifier = { who = root modifier = opinion_non_aligned_league_fe } }
   }
Since root is LNAP leader and from is the first AFE (this event is called by war_in_heaven.12, which is a country event for the first AFE), the above code is simply not right.

Together with problem mentioned in opening post, this piece of code should be as follow:
Code:
   every_country = {
    limit = {
     is_country_type = awakened_fallen_empire
     OR = {
      has_country_flag = sleepers_awake_ancient_rival
      has_country_flag = sleepers_awake_first_sleeper
     }
    }
    add_opinion_modifier = { who = root modifier = opinion_non_aligned_league_fe }
    root = { add_opinion_modifier = { who = prev modifier = opinion_non_aligned_league_fe } }
   }


Yet another problem:
The trigger of event war_in_heaven.14 is missing of this line,
NOT = { has_global_flag = war_in_heaven_ended }
so it can be erroneously triggered even after WiH is over.