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

Phi

Lt. General
103 Badges
Jul 10, 2008
1.335
158
  • Surviving Mars
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • 500k Club
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Conclave
  • Victoria 2
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Battle for Bosporus
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Europa Universalis 4: Emperor
  • Europa Universalis III Complete
  • Stellaris: Necroids
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Europa Universalis III Complete
  • Stellaris: Nemesis
  • Hearts of Iron IV: By Blood Alone
After improving my solution to remove BAR- and REB-states and abusing the title hack again to give cores to core-free countries like new regions (i.e. Greek Armenia), I decided to start a bugfix-collection for rare, but annoying bugs.

Fixed rare, but annoying bugs:
- no more REB- or BAR-states
- no more countries without a core (hence without the ability to build normal units)

As you can see, I have a liberal definition of bug. :)

Simply add the following at the end of common/titles.txt in your preferred mod:
Code:
#######################
### Phi - bug fixes ###
#######################

# Remove REB- and BAR-states
# Case one: There are neighbours
title_remove_bad_states = { 
  allow = {
    is_ruler = yes
  }

  gain_trigger = {
    country = {
      any_neighbor_country = {
        OR = {
          tag="REB"
          tag="BAR"
        }
      }
    }
  }
  
  gain_effect = {
    country = {
      any_neighbor_country = {
        limit = {
          OR = {
            tag="REB"
            tag="BAR"
          }
        }
        random_owned = {
          secede_province = THIS
        }
      }
    }
  }
  
  lose_trigger = {
    title_remove_bad_states = 1
  }
}

# Case two: There are no neighbours
title_remove_bad_states2 = {  
  allow = {
    is_ruler = yes
  }

  gain_trigger = {
    country = {
      any_country = {
        OR = {
          tag="REB"
          tag="BAR"
        }
        # There is no neighboring country
        NOT = {
          any_country = {
            any_neighbor_country = {
              OR = {
                tag="REB"
                tag="BAR"
              }
            }
          }
        }
      }
    }
  }
  
  gain_effect = {
    country = {
      any_country = {
        limit = {
          OR = {
            tag="REB"
            tag="BAR"
          }
          # There is no neighboring country
          NOT = {
            any_country = {
              any_neighbor_country = {
                OR = {
                  tag="REB"
                  tag="BAR"
                }
              }
            }
          }
        }
        random_owned = {
          secede_province = THIS
        }
      }
    }
  }
  
  lose_trigger = {
    title_remove_bad_states2 = 1
  }
}

# Give states without a core (i.e. regions)
# a core on its capital
# They can't build units without one.
title_we_need_a_core = {
  allow = {
    is_ruler = yes
    NOT = {
      country = {
        OR = {
          tag = "REB"
          tag = "BAR"
        }
      }
    }   
  }

  gain_trigger = {
    country = {
      any_province = {
        NOT = { is_core = yes }
      }
    }
  }
  
  gain_effect = {
    country = {
      capital_scope = {
        add_core = THIS
      }
    }
  }
  
  lose_trigger = {
    title_we_need_a_core = 1
  }
}
 
Last edited: