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

PyroAce2

First Lieutenant
77 Badges
Oct 2, 2007
280
5
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Crusader Kings II
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Rome Gold
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Pre-order
  • Pillars of Eternity
  • Magicka 2 - Signup Campaign
  • Magicka 2
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • East India Company Collection
  • 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
  • Deus Vult
  • Magicka
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Art of War
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Victoria 2
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • Warlock: Master of the Arcane
Part of an ahistorical mod that I've created features a new titular empire with 7 titular duchies contained within it - designed to allow an elective succession system with floating seats as I expand outward. The game begins with 5 seats in existence, but the potential for 2 more. In order to create these extra seats, and to replace seats that are destroyed from time to time as titular titles tend to be, I want to create a decision that allows any Duke or King within the Empire that is not already a Seatholder to create one of the missing seats (preferably in order). To that end, I have written the following decision:

Code:
	create_seat_2 = {
		is_high_prio = yes	
		potential = {
			is_ruler = yes
			is_feudal = yes
		}
		allow = {
			OR = {
				has_landed_title = c_1A
				has_landed_title = c_1B
				has_landed_title = c_1C
				has_landed_title = c_1D
				has_landed_title = c_2A
				has_landed_title = c_2B
				has_landed_title = c_2C
				has_landed_title = c_2D
				has_landed_title = c_3A
				has_landed_title = c_3B
				has_landed_title = c_3C
				has_landed_title = c_3D
			}
			NOT = {
				OR = {
					has_landed_title = d_e1
					has_landed_title = d_e2
					has_landed_title = d_e3
					has_landed_title = d_e4
					has_landed_title = d_e5
					has_landed_title = d_e6
					has_landed_title = d_e7
				}
			}
			OR = {
				primary_title = { tier = KING }	
				primary_title = { tier = DUKE }	
			}
			NOT = { primary_title = { tier = EMPEROR } }
			liege = { has_landed_title = e_aesland }
			[B]NOT = { any_province_lord = { has_landed_title = d_e2 } }[/B]
			AND = {
				is_title_active = d_e1
			}
			treasury = 300
			piety = 200
            prestige = 300   
		}
		effect = {
			treasury = -300
			piety = -200
                        d_e2 = {
                              gain_title = FROM
                              }
                        }
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 100
		}		
	}

I am having trouble with it - specifically the bolded line: NOT = { any_province_lord = { has_landed_title = d_e2 } }

What I want that line to do is to check to see if any lord anywhere currently holds that title and prevent the decision so long as someone holds the title. What is happening is that the game instead looks to see if it can find any lord that does not have that title... in other words its always true and therefore it is always possible for titles to be stolen. I have tried using the is_active line, but that remains true so long as the title has existed at some point in the past, which is useless to me if I am looking to allow the recreation of destroyed seats.

Any thoughts on a way to write that line that will achieve the ends I seek?
 
Well, I'm not really sure, but you could try looking at how some plot objectives check for no crown laws.

Code:
# Does not have a crownlaw title
NOT = {
	crownlaw_title = {
		always = yes
	}
}

You might be able to do something similar using a limit on that any_province_lord scope (where has_landed_title = d_e2 is in the limit) but I'm still learning this scripting language and there's not a lot of documentation on it.
 
Well, I'm not really sure, but you could try looking at how some plot objectives check for no crown laws.

Code:
# Does not have a crownlaw title
NOT = {
	crownlaw_title = {
		always = yes
	}
}

You might be able to do something similar using a limit on that any_province_lord scope (where has_landed_title = d_e2 is in the limit) but I'm still learning this scripting language and there's not a lot of documentation on it.

I've messed around with it a bit, but I can't seem to get a limit to work. Any suggestion on proper syntax to script what you're saying here would be very much appreciated!