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

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.836
2.219
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • 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: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
As we're not suppose to ask questions to Captain Gars in the log thread, and he doesn't check quick questions, this thread is for asking him questions when all other options have failed.

Rules:
  • Do not post questions or suggestions on new features in this thread. Do that in suggestions for improved moddability.
  • Do not post questions in here if first. Start in Quick Questions to see if the modding community as a whole can help you.
  • Only post in here once you've thoroughly tried to figure them out on your own first and the modding community has not been able to help you solve the problem. If someone hasn't suggested you ask in here, then you probably shouldn't.
  • Don't post a question in here just because you didn't get an answer in quick questions.
  • When you do ask a question, try to include all the relevant information on what you're trying to do in the first post, as well as information on your personal tests. If a save file or link to your mod are needed, be sure to include them. Anyone should be able to recreate the issue using the information you provide.

If there are any problems here or changes you'd like to make to the rules Captain Gars, please feel free to change things.
 

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.836
2.219
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • 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: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
My question has to do with the scope change "any_de_jure_vassal_title". In my in game tests, this line seems to cause problems. The game ignores the line its on when executing, including the opening curly bracket. Is the line working? richvh suggested it should be brought up with you.

Alternatively, can you give any suggestions on how to scope from a province to all the holdings in it? I'd like to test to see if a building exists in the province that a person is currently in. This is for the Crisis of the Confederation mod, where being in a province that has a hospital makes you heal faster from wounds and illness, and the level 2 version of the building gives a boost to overall health to anyone in the province (rule, courtiers, and barony rulers). This is accomplished through events that add and remove the traits.

EDIT: Got a solution, but didn't use "any_de_jure_vassal_title" in the end to pull it off.
 
Last edited:

Zarathustra_the

Lt. General
85 Badges
Nov 3, 2011
1.645
985
  • Victoria 2: A House Divided
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • For the Motherland
  • 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
  • Europa Universalis III
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
Does anyone know what the base_unit function thingy do for special_units? I ask it here in hopes someone might be able to tell me just which flags it hits and carries to the custom unit from the base unit, for example does it share tactics etc etc.
 

zijistark

HIP Lead
58 Badges
Jan 29, 2013
5.118
3.074
zijistark.com
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Knights of Honor
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: The Old Gods
  • Cities in Motion
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III: Chronicles
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Rights of Man
  • Victoria 2
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • 500k Club
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
My question has to do with the scope change "any_de_jure_vassal_title". In my in game tests, this line seems to cause problems. The game ignores the line its on when executing, including the opening curly bracket. Is the line working? richvh suggested it should be brought up with you.

Alternatively, can you give any suggestions on how to scope from a province to all the holdings in it? I'd like to test to see if a building exists in the province that a person is currently in. This is for the Crisis of the Confederation mod, where being in a province that has a hospital makes you heal faster from wounds and illness, and the level 2 version of the building gives a boost to overall health to anyone in the province (rule, courtiers, and barony rulers). This is accomplished through events that add and remove the traits.

Quick Questions. Try scoping to the county, then any_de_jure_vassal_title = { has_holder = yes <other conditions about the barony> }.

One question: in one of the DDs for charlomagne it was mention modding support for changing of COAs and flags through events, but I think no sysntax was provided. Can it be explained here or in the Captain's log?

Syntax will be provided in less than 2 weeks, when it can be used. It's simple.
 

LDRevolution

Bacon Pancakes
39 Badges
Dec 5, 2012
540
167
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Res Publica
  • March of the Eagles
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Age of Wonders: Planetfall Sign Up
  • Crusader Kings III
  • Stellaris: Necroids
  • Crusader Kings II: Reapers Due
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 500k Club
  • Europa Universalis IV
How to stop a dead dynasty from reappearing again, I've asked the Quick Question forums countless time but to no avail, and the used_for_random=no doesn't seem to work.
 

Rylock

Field Marshal
64 Badges
Mar 10, 2008
11.618
2.427
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • 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
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • Shadowrun: Hong Kong
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Reapers Due
  • PDXCon 2017 Awards Winner
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Pride of Nations
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Man there's gonna be some backlash if he doesn't answer.

While it'd be nice if he does, there should be no expectation that he will. You should know as well as I that just because we don't have an answer to a question doesn't mean a developer is beholden to come and answer it. Indeed, if popping his head above water means that he'll get swarmed by every single person who believes they need a dev's personal attention, and who will cry foul if they don't receive it, we'll likely see less of him and not more.
 

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.836
2.219
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • 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: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Quick Questions. Try scoping to the county, then any_de_jure_vassal_title = { has_holder = yes <other conditions about the barony> }.

This is identical to what I've been doing already other then including a check to see if the county has a holder. The game doesn't even get to that line, it just fails the instant it hits any_de_jure_vassal_title. I've already asked this question in quick questions and tried a many different things to get it working. The end result is the same, the game doesn't recognize that line. That's why I'm asking in here.

5267E7B5DD9E5DD11946451550501A9C5D811C33


Code:
character_event = {
	id = maintenance.504
	hide_window = yes
	
	trigger = {
		NOT = { has_character_modifier = hospital_health_bonus }
		location = {
			any_de_jure_vassal_title = { 
				has_holder = yes
				has_building = tp_hospital_q_2
			}
		}
	}
	
	immediate = { add_character_modifier = { name = hospital_health_bonus duration = -1 } }
	
}
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • 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
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
You're still trying to scope from a province scope (location) to the de jure vassal titles, and that can only be done from title scope.
 

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.836
2.219
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • 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: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
You're still trying to scope from a province scope (location) to the de jure vassal titles, and that can only be done from title scope.
As I pointed out in the quick question thread, doing that gives the same result. I've tried this too:

Code:
character_event = {
	id = maintenance.504
	hide_window = yes
	
	trigger = {
		NOT = { has_character_modifier = hospital_health_bonus }
		location = {
			county = { 
				any_de_jure_vassal_title = { 
					has_building = tp_hospital_q_2
				}
			}
		}
	}
	
	immediate = { add_character_modifier = { name = hospital_health_bonus duration = -1 } }
	
}

Checking county on the wiki says that county is only valid if you're scoping from a barony, apparently. I've tried capital too. any_direct_de_jure_vassal_title was suggested in the other thread, but that only scoped to the county title, not all the baronies.
 

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • 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
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
I think I found the answer in the better rebels mod:
Code:
	option = {
		name = "EVTOPTAbetter_rebels.2"
		trigger = { owner = { has_character_flag = building_is_destroyed } }
		owner = {
			random_demesne_title = {
				limit = {
					location = {
						province_id = ROOT
					}
					tier = baron
					num_of_buildings = 1
				}
				destroy_random_building = yes
			}
		}
	}
So for your purposes,
Code:
location = {
   owner = {
      random_demesne_title = {
         limit = {
            province_id = PREVPREV #location
         }
         any_de_jure_vassal_title = {
            has_building = xxx
 

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.836
2.219
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • 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: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete

No good, the game gets as far as any_de_jure_vassal_title and fails, as usual. Now, the game doesn't match the province correctly, it says it's checking to see if the province is "Deep Space", which doesn't exist as a province. My capital province in this test is, "Hades". However, removing the limit on random_demesne_title doesn't work either.

EC9537073E0AF626E9047731A73D9203F364549F


Code:
character_event = {
	id = maintenance.504
	hide_window = yes
	
	trigger = {
		NOT = { has_character_modifier = hospital_health_bonus }
		location = {
			owner = {
				random_demesne_title = {
					limit = {
						province_id = PREVPREV #location
					}
					any_de_jure_vassal_title = {
						has_building = tp_hospital_q_2
					}
				}
			}
		}
	}
	
	immediate = { add_character_modifier = { name = hospital_health_bonus duration = -1 } }
	
}
 

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
My question has to do with the scope change "any_de_jure_vassal_title". In my in game tests, this line seems to cause problems. The game ignores the line its on when executing, including the opening curly bracket. Is the line working? richvh suggested it should be brought up with you.

Alternatively, can you give any suggestions on how to scope from a province to all the holdings in it? I'd like to test to see if a building exists in the province that a person is currently in. This is for the Crisis of the Confederation mod, where being in a province that has a hospital makes you heal faster from wounds and illness, and the level 2 version of the building gives a boost to overall health to anyone in the province (rule, courtiers, and barony rulers). This is accomplished through events that add and remove the traits.

EDIT: Got a solution, but didn't use "any_de_jure_vassal_title" in the end to pull it off.

any_de_jure_vassal_title only exists as an effect - not as a trigger. That's why it's not working.
 

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
How to stop a dead dynasty from reappearing again, I've asked the Quick Question forums countless time but to no avail, and the used_for_random=no doesn't seem to work.

I believe you should set can_appear to equal no.
 

Captain Gars

Lead AI Programmer
4 Badges
Oct 4, 2010
5.887
905
  • Crusader Kings II
  • Sengoku
  • 500k Club
  • Paradox Order
Does anyone know what the base_unit function thingy do for special_units? I ask it here in hopes someone might be able to tell me just which flags it hits and carries to the custom unit from the base unit, for example does it share tactics etc etc.

It is so that the game knows how to handle them, so in combat they are included when the strength of that sub-unit type is calculated etc. Same for calculating what graphical type to show on the map.
 

Zarathustra_the

Lt. General
85 Badges
Nov 3, 2011
1.645
985
  • Victoria 2: A House Divided
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • The Kings Crusade
  • Magicka
  • Cities in Motion
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Naval War: Arctic Circle
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mare Nostrum
  • Stellaris - Path to Destruction bundle
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Reapers Due
  • For the Motherland
  • 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
  • Europa Universalis III
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Magicka 2: Ice, Death and Fury
  • Crusader Kings II: Conclave
  • Stellaris
  • Warlock: Master of the Arcane
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
It is so that the game knows how to handle them, so in combat they are included when the strength of that sub-unit type is calculated etc. Same for calculating what graphical type to show on the map.

It does not carry over the graphical unit, they always use the horse archer model.
 

Sleight of Hand

retired modder
On Probation
14 Badges
Feb 14, 2012
12.114
5.867
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • Hearts of Iron III
  • March of the Eagles
  • Europa Universalis IV
  • Victoria 2
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Steel Division: Normand 44 Sign-up
1) How does 'default_culture_modifier' in cultures.txt work, and could an example of a custom modifier be provided? I think you can add them to the modifiers defines file and link up with them, but I don't know what the correct syntax would be.

2) Will we see any new variants of 'grammar_transform' in the future, or indeed the possibility of modifying them/creating our own? For example, new customization for Slavic and Baltic naming and dynasties.