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

michx0

First Lieutenant
75 Badges
Feb 16, 2015
269
25
  • Hearts of Iron III Collection
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Jade Dragon
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Crusader Kings II: Sons of Abraham
  • 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
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Stellaris: Nemesis
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • War of the Roses
  • Warlock: Master of the Arcane
  • The Showdown Effect
Short summary of your issue
Spouses leave court wandering - Duplicate but I will explain EXACTLY WHY it happens

Game Version
1.5.1

What OS are you playing on?
Windows

What platform are you using?
Steam

What DLC do you have installed?
Royal Court,

Do you have mods enabled?
No

Have you tried verifying your game files (Steam only)?
Yes

How much "pain" is this causing you?
5

Please explain the issue you experienced in the most condensed way possible
There were bug reports about spouses of heirs (and other) leaving court to become wanderers.

But I know why.

Spoiler - is_in_the_same_court_as trigger is not working correctly.

Please explain how to reproduce the issue
0) Since I play with mods, I used random Ironman save from this forum to quickly prove it is not mod related. Hope it's OK.

1) To see exactly what's going on you need to mod a liitle. Take common/courtier_guest_management/courtier_management.txt and change

can_leave = {
any_traveling_family_member = {
count = all
courtier_allowed_to_leave_trigger = yes
}
}

to

can_leave = {
courtier_allowed_to_leave_trigger = yes
any_traveling_family_member = {
count = all
courtier_allowed_to_leave_trigger = yes
}
}

Now in debug mode we can see trigger boxes for chosen character, since it won't show us specifics for any_..._member.

Let's load the save in debug mode now.

2) Switch to King of Italy and look at his courtier Hermelinda Guideschi. She is married to Heir and Court Musician of the king, but she has can_leave = true. Why?

Open common/scripted_triggers/00_courtier_guest_management_triggers.txt on courtier_allowed_to_leave_trigger.

Now let's look.

Apparenlty (image 1.png, had to scale interface to see full list):

A) Her husband is not in the same court as her (red box)

#Non-dominant spouses don't wander off
AND = {
is_married = yes
any_spouse = {
is_in_the_same_court_as = scope:leaving_courtier >>>>>>>>> RIGHT HERE
}
trigger_if = {
limit = { is_female = yes }
scope:liege = {
OR = {
has_realm_law = male_only_law
has_realm_law = male_preference_law
}
}
}

B) She has no spouses or underage children in the same court that are NOT part of any_traveling_family_member list (green box on top)

#Would be leaving without a child or consort
any_child_not_in_traveling_family_trigger = yes
any_consort_not_in_traveling_family_trigger = yes

And she has no any_traveling_family_member that is blocked from leaving (green box on bottom) which means that her husband is NOT in the list.

any_traveling_family_member = {
count = all
courtier_allowed_to_leave_trigger = yes
}

All of these triggers use functions with
is_in_the_same_court_as
in them.

Also, why is her husband not in the list?

3) Now let's look at Queen Kira of Italy (image 2 yellow box). She actually is in the same court as her husband. So it works on spouse-liege.

But does she know where her child is? Well, actually we can't tell, either that or her child is in the traveling list. But I will show you that she does not know in 5).

4) Unfortunately I can't find an example now but I saw characters that had both spouse and children not in the traveling list. I don't know conditions so you have to look at this closely, maybe it's ok.

Those characters had can_leave=true despite their spouse and kids were in the same court.

For example, if landed character married another landed character, that later became unlanded and moved to spouse's court, that character won't have husband and kids in list and will have can_leave=true (waited 3 years, no list update happened).

Based on that I see 2 issues here:
A) is_in_the_same_court_as trigger only work on liege, not on another fellow courtier;
B) Traveling list won't update sometimes when it should (on marriage, on child birth, on changing court???)

5) At last, to be 200% sure that is_in_the_same_court_as doesn't work you need simply to write any test check/interaction comparing two unlanded courtiers in the same court. I did it with educate_child interaction since it is the only other function where is_in_the_same_court_as used (it works because you check scope:actor which is liege). I added something like this:

populate_recipient_list = {
scope:recipient = {
...
random_courtier = { save_scope_as = testsamecourt }

...

is_valid_showing_failures_only = {
scope:recipient = {
is_in_the_same_court_as = scope:testsamecourt

And got this (3.png).

Is there anything else you think could help us identify/replicate the issue?
In conclusion:
1) Trigger is_in_the_same_court_as is not working on courtiers unless one of them is also liege of other. Examples are above or you can write a simple check to compare any two characters in the same court to make sure that they "don't see" each other.

This is the main reason why spouses of heirs (and other characters) sometimes move leaving spouses and children behind.

2) Sometimes spouses and children of character in the same court as them are not added to traveling list, maybe it's WAD, I can't be sure.

I have attached a save game
Yes

Upload Attachment
File(s) attached
 

Attachments

  • Daura_867_Ironman.ck3
    26 MB · Views: 0
  • 1.png
    1.png
    1 MB · Views: 0
  • 2.png
    2.png
    608,8 KB · Views: 0
  • 3.png
    3.png
    2,8 MB · Views: 0
  • 1
  • 1Like
Reactions:
Update. Now when I think about - being a non-dominant spouse shouldn't be there at all, since if non-dominant spouse will be blocked from leaving, dominant spouse also can't leave because

any_traveling_family_member = {
count = all
courtier_allowed_to_leave_trigger = yes
}

will be false. Non-dominant spouses should be excluded from evaluation at all, instead should check dominant spouse for both of them (f.e. block both if any of them has court position).