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

Immortal88

Major
102 Badges
Sep 25, 2012
628
475
  • Sengoku
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Hearts of Iron IV Sign-up
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Way of Life
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Prison Architect
  • Crusader Kings Complete
  • Imperator: Rome
  • Europa Universalis IV: Cradle of Civilization
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Warlock: Master of the Arcane
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV
  • Europa Universalis IV: Dharma
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Crusader Kings II: Holy Fury
  • Shadowrun Returns
  • Teleglitch: Die More Edition
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • War of the Roses
  • Age of Wonders: Shadow Magic
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Rule Britannia
  • Magicka: Wizard Wars Founder Wizard
  • Victoria 3 Sign Up
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
Okay, so I need a way to remove every courtier in the game who is not a ruler or has a titular title.
If possible, then preferably via simply editing a savefile via notepad++

The problem is that rulers and courtiers are all simply under a "characters" section and mixed throughout so simply deleting the entire section won't do.
 
Last edited:
Okay so I need a way to remove every courtier in the game who is not a ruler or has a titular title.
If possible, then preferably via simply by editing a savefile via notepad++

The problem is that rulers and courtiers are all simply under a "characters" section and mixed throughout so simply deleting the entire section won't do.
best doing it ingame with an event or decision. The engine will generate a bunch of new ones anyway.
 
My best bet at how to do it quickly without spending too much time fiddling around :

1) Transform the file so that it is a valid json file
2) Use json tool (or create javascript) to remove specific element using filter (write the one you want to keep)
3) Inverse the transformation from json to regular ck2 format


Also possible, as proposed by Arko, create an event with a MTTH = 1 (very quick to happen), that would trigger only if they are not ruler and would have an only choice that would lead to their death.
 
So I tried literally deleting every character except for one ruler ( like 30k+ lines of code) in the hope that the game would simply generate new rulers on day 2 and that I can pick that one left over character to start a game but it doesn't quite work out. I can pick that one left-over ruler and he literally annexes the entire map day by day apart from islands, which I then can't select since they don't generate characters.
 
For the event, it would look like :

Code:
character_event = {
   id = 9999999999
    desc = My event description
    picture = "GFX_evt_shadow"
   
    trigger = {
        is_ruler = false
    }
   
  mean_time_to_happen = {
      days = 1
   }

    option = {
        name = Name of the option
        death = { death_reason = death_execution }
    }
}

I did it on the fly, not sure if working as it is, but should be close.
 
For the event, it would look like :

Code:
character_event = {
   id = 9999999999
    desc = My event description
    picture = "GFX_evt_shadow"
  
    trigger = {
        is_ruler = false
    }
  
  mean_time_to_happen = {
      days = 1
   }

    option = {
        name = Name of the option
        death = { death_reason = death_execution }
    }
}

I did it on the fly, not sure if working as it is, but should be close.
Thank you very much I'll try it out and report back :)
 
Okay guys I'm almost there, only one little tweak left... :D

Courtiers are auto-generated a few days later and I can't keep an event running that's this intensive and checks every newly generated courtier and kills them. What I need is for Rulers to start without courtiers initially but once they get couriters they shouldn't be killed every one or two days.

Now I managed to achieve the first part of my mission by killing every courtier only once via decision.
Even better the infinity gauntlet artifact is destroyed after the death of your first character.

Code:
decisions = {
      Mass Genocide = {
          is_high_prio = yes
          potential = {
              ai = no
              has_artifact = prosthetic_hand_gold
          }
          allow = {
              has_artifact = prosthetic_hand_gold
          }
          effect = {
              hidden_tooltip = {
                  any_character = {
             independent = no
                      limit = {
                          ai = yes
                      }
                      random = {
                          chance = 100
                          death = {
                              death_reason = death_missing
                          }
                      }
                  }
              }
          }
      }
}

So what I need now is to find the vanilla event that checks if courts have less than x courtiers and auto-generates new ones in order to disable it. I couldn't find it yet. Anyone?

I believe what I should be looking for is a "create_character" event in the vanilla events folder but I can't find it and there's a boatload of hits if I search for "create_character" in all event.txt's via notepad++.
 
Last edited:
I believe what I should be looking for is a "create_character" event in the vanilla events folder but I can't find it and there's a boatload of hits if I search for "create_character" in all event.txt's via notepad++.
Well, there's your problem. There's trillions of events, decisions, mechanics etc. that generate courtiers. Some of which may even be in hard code. I don't think it is possible to remove them all.
 
Well, there's your problem. There's trillions of events, decisions, mechanics etc. that generate courtiers. Some of which may even be in hard code. I don't think it is possible to remove them all.

Oh no I don't want to remove all of them, just the one event that automatically generates them due to having too few courtiers.